mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-05 03:58:23 +00:00
consensus: don't generate stateroot before StateRootEnableIndex
This commit is contained in:
parent
ee61120e13
commit
25307834ab
1 changed files with 1 additions and 1 deletions
|
@ -260,7 +260,7 @@ func (s *service) getStateRootSig() []byte {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *service) newCommit() payload.Commit {
|
func (s *service) newCommit() payload.Commit {
|
||||||
if s.stateRootEnabled() {
|
if s.stateRootEnabled() && s.dbft.Context.BlockIndex > s.Chain.GetConfig().StateRootEnableIndex {
|
||||||
// This is being called when we're ready to commit, so we can safely
|
// This is being called when we're ready to commit, so we can safely
|
||||||
// relay stateroot here.
|
// relay stateroot here.
|
||||||
stateRoot, err := s.Chain.GetStateRoot(s.dbft.Context.BlockIndex - 1)
|
stateRoot, err := s.Chain.GetStateRoot(s.dbft.Context.BlockIndex - 1)
|
||||||
|
|
Loading…
Reference in a new issue