From 8310b76d28705e3ef0301e870dc44ea1472f93a3 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Wed, 12 Feb 2020 18:14:28 +0300 Subject: [PATCH] core: properly save votes when processing Account descriptor They were ignored basically. --- pkg/core/blockchain.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/core/blockchain.go b/pkg/core/blockchain.go index e88cdd08b..c723f2e50 100644 --- a/pkg/core/blockchain.go +++ b/pkg/core/blockchain.go @@ -713,8 +713,8 @@ func processAccountStateDescriptor(descriptor *transaction.StateDescriptor, dao if err != nil { return err } + account.Votes = votes if votes.Len() != len(account.Votes) { - account.Votes = votes for _, vote := range votes { validator, err := dao.GetValidatorStateOrNew(vote) if err != nil { @@ -725,6 +725,7 @@ func processAccountStateDescriptor(descriptor *transaction.StateDescriptor, dao } } } + return dao.PutAccountState(account) } return nil }