mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-04 19:19:44 +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 {
|
||||
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
|
||||
// relay stateroot here.
|
||||
stateRoot, err := s.Chain.GetStateRoot(s.dbft.Context.BlockIndex - 1)
|
||||
|
|
Loading…
Reference in a new issue