stateroot: s/onValidatedRoot/relayExtensible/

Makes more sense because it's not just roots that we're relaying.
This commit is contained in:
Roman Khimov 2021-05-06 22:29:19 +03:00
parent 222b4dc920
commit 847927af74
3 changed files with 4 additions and 4 deletions

View file

@ -95,5 +95,5 @@ func (s *service) sendValidatedRoot(r *state.MPTRoot, acc *wallet.Account) {
buf := io.NewBufBinWriter()
emit.Bytes(buf.BinWriter, sig)
ep.Witness.InvocationScript = buf.Bytes()
s.onValidatedRoot(ep)
s.relayExtensible(ep)
}

View file

@ -45,7 +45,7 @@ type (
srMtx sync.Mutex
incompleteRoots map[uint32]*incompleteRoot
onValidatedRoot RelayCallback
relayExtensible RelayCallback
blockCh chan *block.Block
done chan struct{}
}
@ -66,7 +66,7 @@ func New(cfg config.StateRoot, log *zap.Logger, bc blockchainer.Blockchainer, cb
incompleteRoots: make(map[uint32]*incompleteRoot),
blockCh: make(chan *block.Block),
done: make(chan struct{}),
onValidatedRoot: cb,
relayExtensible: cb,
}
s.MainCfg = cfg

View file

@ -91,7 +91,7 @@ func (s *service) signAndSend(r *state.MPTRoot) error {
buf := io.NewBufBinWriter()
emit.Bytes(buf.BinWriter, sig)
e.Witness.InvocationScript = buf.Bytes()
s.onValidatedRoot(e)
s.relayExtensible(e)
return nil
}