diff --git a/pkg/services/stateroot/network.go b/pkg/services/stateroot/network.go index 28322a239..185ec2951 100644 --- a/pkg/services/stateroot/network.go +++ b/pkg/services/stateroot/network.go @@ -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) } diff --git a/pkg/services/stateroot/service.go b/pkg/services/stateroot/service.go index 694d9fd99..636702450 100644 --- a/pkg/services/stateroot/service.go +++ b/pkg/services/stateroot/service.go @@ -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 diff --git a/pkg/services/stateroot/validators.go b/pkg/services/stateroot/validators.go index a364ea6a5..d33d0f5fc 100644 --- a/pkg/services/stateroot/validators.go +++ b/pkg/services/stateroot/validators.go @@ -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 }