forked from TrueCloudLab/neoneo-go
native: never set Neo's newEpoch* cache values to nil
We have cache update mechanism (Neo's cache votesChanged flag), it must be used for current epoch and new epoch cached values update. And the cached current/new epoch values themselves must always contain valid information for the current/new epoch. These cached values must only be changed once per epoch, never set them to nil. This commit prevents CN node panic described in #3253 when dBFT tries to retrieve new epoch validators with some votes modifications made before at the same dBFT epoch. Close #3253. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
This commit is contained in:
parent
de98b39a95
commit
d7d850ac7d
1 changed files with 0 additions and 1 deletions
|
@ -971,7 +971,6 @@ func (n *NEO) ModifyAccountVotes(acc *state.NEOBalance, d *dao.Simple, value *bi
|
|||
return nil
|
||||
}
|
||||
}
|
||||
cache.newEpochNextValidators = nil
|
||||
return putConvertibleToDAO(n.ID, d, key, cd)
|
||||
}
|
||||
return nil
|
||||
|
|
Loading…
Reference in a new issue