From 6f23dbfefe5fe1d8d186778877155080658fc240 Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Thu, 25 Nov 2021 17:52:10 +0300 Subject: [PATCH] [#971] innerring: Use VUB pointer for initial committee vote Signed-off-by: Alex Vanin --- pkg/innerring/state.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/innerring/state.go b/pkg/innerring/state.go index 305f7a2e3..c4cfb1d45 100644 --- a/pkg/innerring/state.go +++ b/pkg/innerring/state.go @@ -110,6 +110,7 @@ func (s *Server) voteForSidechainValidator(prm governance.VoteValidatorPrm) erro var ( nonce uint32 = 1 vub uint32 + vubP *uint32 err error ) @@ -118,10 +119,11 @@ func (s *Server) voteForSidechainValidator(prm governance.VoteValidatorPrm) erro if err != nil { return fmt.Errorf("could not calculate nonce and `validUntilBlock` values: %w", err) } + vubP = &vub } s.contracts.alphabet.iterate(func(letter GlagoliticLetter, contract util.Uint160) { - err := s.morphClient.NotaryInvoke(contract, s.feeConfig.SideChainFee(), nonce, &vub, voteMethod, int64(epoch), validators) + err := s.morphClient.NotaryInvoke(contract, s.feeConfig.SideChainFee(), nonce, vubP, voteMethod, int64(epoch), validators) if err != nil { s.log.Warn("can't invoke vote method in alphabet contract", zap.Int8("alphabet_index", int8(letter)),