mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-26 09:42:22 +00:00
Merge pull request #2972 from nspcc-dev/dynamic-services
core: improve documentation of SetOracle/SetNotary
This commit is contained in:
commit
b9f95a820c
1 changed files with 4 additions and 4 deletions
|
@ -328,8 +328,8 @@ func NewBlockchain(s storage.Store, cfg config.Blockchain, log *zap.Logger) (*Bl
|
|||
return bc, nil
|
||||
}
|
||||
|
||||
// SetOracle sets oracle module. It doesn't protected by mutex and
|
||||
// must be called before `bc.Run()` to avoid data race.
|
||||
// SetOracle sets oracle module. It can safely be called on the running blockchain.
|
||||
// To unregister Oracle service use SetOracle(nil).
|
||||
func (bc *Blockchain) SetOracle(mod native.OracleService) {
|
||||
orc := bc.contracts.Oracle
|
||||
if mod != nil {
|
||||
|
@ -356,8 +356,8 @@ func (bc *Blockchain) SetOracle(mod native.OracleService) {
|
|||
bc.contracts.Designate.OracleService.Store(&mod)
|
||||
}
|
||||
|
||||
// SetNotary sets notary module. It doesn't protected by mutex and
|
||||
// must be called before `bc.Run()` to avoid data race.
|
||||
// SetNotary sets notary module. It may safely be called on the running blockchain.
|
||||
// To unregister Notary service use SetNotary(nil).
|
||||
func (bc *Blockchain) SetNotary(mod native.NotaryService) {
|
||||
if mod != nil {
|
||||
keys, _, err := bc.contracts.Designate.GetDesignatedByRole(bc.dao, noderoles.P2PNotary, bc.BlockHeight())
|
||||
|
|
Loading…
Reference in a new issue