From 1dcace159422d5670807847ba08c0c88995ad8b7 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Thu, 23 Apr 2020 16:25:30 +0300 Subject: [PATCH] native: don't distribute gas at block 0 It fails at the moment and it doesn't make sense at conceptual level. --- pkg/core/native/native_neo.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/core/native/native_neo.go b/pkg/core/native/native_neo.go index 8ebb5a526..127afe44c 100644 --- a/pkg/core/native/native_neo.go +++ b/pkg/core/native/native_neo.go @@ -125,7 +125,7 @@ func (n *NEO) increaseBalance(ic *interop.Context, acc *state.Account, amount *b } func (n *NEO) distributeGas(ic *interop.Context, acc *state.Account) error { - if ic.Block == nil { + if ic.Block == nil || ic.Block.Index == 0 { return nil } sys, net, err := ic.Chain.CalculateClaimable(util.Fixed8(acc.NEO.Balance.Int64()), acc.NEO.BalanceHeight, ic.Block.Index)