stateroot: s/onValidatedRoot/relayExtensible/
Makes more sense because it's not just roots that we're relaying.
This commit is contained in:
parent
222b4dc920
commit
847927af74
3 changed files with 4 additions and 4 deletions
|
@ -95,5 +95,5 @@ func (s *service) sendValidatedRoot(r *state.MPTRoot, acc *wallet.Account) {
|
||||||
buf := io.NewBufBinWriter()
|
buf := io.NewBufBinWriter()
|
||||||
emit.Bytes(buf.BinWriter, sig)
|
emit.Bytes(buf.BinWriter, sig)
|
||||||
ep.Witness.InvocationScript = buf.Bytes()
|
ep.Witness.InvocationScript = buf.Bytes()
|
||||||
s.onValidatedRoot(ep)
|
s.relayExtensible(ep)
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ type (
|
||||||
srMtx sync.Mutex
|
srMtx sync.Mutex
|
||||||
incompleteRoots map[uint32]*incompleteRoot
|
incompleteRoots map[uint32]*incompleteRoot
|
||||||
|
|
||||||
onValidatedRoot RelayCallback
|
relayExtensible RelayCallback
|
||||||
blockCh chan *block.Block
|
blockCh chan *block.Block
|
||||||
done chan struct{}
|
done chan struct{}
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ func New(cfg config.StateRoot, log *zap.Logger, bc blockchainer.Blockchainer, cb
|
||||||
incompleteRoots: make(map[uint32]*incompleteRoot),
|
incompleteRoots: make(map[uint32]*incompleteRoot),
|
||||||
blockCh: make(chan *block.Block),
|
blockCh: make(chan *block.Block),
|
||||||
done: make(chan struct{}),
|
done: make(chan struct{}),
|
||||||
onValidatedRoot: cb,
|
relayExtensible: cb,
|
||||||
}
|
}
|
||||||
|
|
||||||
s.MainCfg = cfg
|
s.MainCfg = cfg
|
||||||
|
|
|
@ -91,7 +91,7 @@ func (s *service) signAndSend(r *state.MPTRoot) error {
|
||||||
buf := io.NewBufBinWriter()
|
buf := io.NewBufBinWriter()
|
||||||
emit.Bytes(buf.BinWriter, sig)
|
emit.Bytes(buf.BinWriter, sig)
|
||||||
e.Witness.InvocationScript = buf.Bytes()
|
e.Witness.InvocationScript = buf.Bytes()
|
||||||
s.onValidatedRoot(e)
|
s.relayExtensible(e)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue