From b7194ec60894294a13b283af08e4bb426ff09ee0 Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Mon, 29 Mar 2021 17:06:37 +0300 Subject: [PATCH] core: put candidate account to the storage during (*NEO).vote C# node uses Snapshot.GetAndChange to get it from storage, so it's the same problem as with voting account. Affects dumps. --- pkg/core/native/native_neo.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/core/native/native_neo.go b/pkg/core/native/native_neo.go index 5338abf87..75b2a7a95 100644 --- a/pkg/core/native/native_neo.go +++ b/pkg/core/native/native_neo.go @@ -738,6 +738,11 @@ func (n *NEO) VoteInternal(ic *interop.Context, h util.Uint160, pub *keys.Public return errors.New("unknown validator") } cd := new(candidate).FromBytes(valSi) + // we should put it in storage anyway as it affects dumps + err = ic.DAO.PutStorageItem(n.ID, valKey, valSi) + if err != nil { + return err + } if !cd.Registered { return errors.New("validator must be registered") }