core: put voiting account to the storage during (*NEO).vote
After getting account from the storage there are a lot of checks which may fail. But C# node uses Snapshot.GetAndChange, so the account state should be put in the storage even in case of vote failure. Affects dumps.
This commit is contained in:
parent
3d8d927178
commit
c63528db44
1 changed files with 5 additions and 0 deletions
|
@ -726,6 +726,11 @@ func (n *NEO) VoteInternal(ic *interop.Context, h util.Uint160, pub *keys.Public
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
// we should put it in storage anyway as it affects dumps
|
||||||
|
err = ic.DAO.PutStorageItem(n.ID, key, si)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
if pub != nil {
|
if pub != nil {
|
||||||
valKey := makeValidatorKey(pub)
|
valKey := makeValidatorKey(pub)
|
||||||
valSi := ic.DAO.GetStorageItem(n.ID, valKey)
|
valSi := ic.DAO.GetStorageItem(n.ID, valKey)
|
||||||
|
|
Loading…
Reference in a new issue