From 37d44b94e1ac7b42814715e2bcd121bd8b13a776 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Tue, 23 Jun 2020 18:40:28 +0300 Subject: [PATCH] native: fix netfee gas redistribution Preview2 testnet: file BlockStorage_100000/dump-block-12000.json: block 11562: key mismatch: feffffff1454a6cb279fbcedc66162ad4ad5d1d910202b92743e000000000000000000000005 vs feffffff1431b7e7aea5131f74721e002c6a56b610885813f79e000000000000000000000005 Originally this code was written to run after transactions processing, but after 0fa4c497352bd225c5035c0aa453d5fc3ee5d80f it works in different manner. --- pkg/core/native/native_gas.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/core/native/native_gas.go b/pkg/core/native/native_gas.go index d5eef961c..000f365d1 100644 --- a/pkg/core/native/native_gas.go +++ b/pkg/core/native/native_gas.go @@ -87,7 +87,7 @@ func (g *GAS) OnPersist(ic *interop.Context) error { absAmount := big.NewInt(int64(tx.SystemFee + tx.NetworkFee)) g.burn(ic, tx.Sender, absAmount) } - validators, err := g.NEO.GetValidatorsInternal(ic.Chain, ic.DAO) + validators, err := g.NEO.GetNextBlockValidatorsInternal(ic.Chain, ic.DAO) if err != nil { return fmt.Errorf("cannot get block validators: %v", err) }