From 7987cdadc0ee39f3ab4091b51be6f6634324c8fb Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Tue, 23 Jun 2020 22:31:57 +0300 Subject: [PATCH] native: update storage item value after gas distribution Even if the value is zero, the GAS distribution updates the balance height, so storage item must be updated too. Fixes the followin on preview2 testnet: block 74227: value mismatch for key ffffffff1454a6cb279fbcedc66162ad4ad5d1d910202b92743e000000000000000000000005: 1041032104809fd5002103f3210128010000 vs 1041032104809fd50021033f110128010000 --- pkg/core/native/native_neo.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/core/native/native_neo.go b/pkg/core/native/native_neo.go index 55c119b3f..10eb38ac8 100644 --- a/pkg/core/native/native_neo.go +++ b/pkg/core/native/native_neo.go @@ -159,6 +159,7 @@ func (n *NEO) increaseBalance(ic *interop.Context, h util.Uint160, si *state.Sto return err } if amount.Sign() == 0 { + si.Value = acc.Bytes() return nil } if len(acc.Votes) > 0 {