From cfe513437529047b45b0542f3dc021ad3759d28b Mon Sep 17 00:00:00 2001 From: Aayush Rajasekaran Date: Mon, 31 Aug 2020 18:53:14 -0400 Subject: [PATCH] Use Sign() to check zero-equality --- node/impl/full/gas.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node/impl/full/gas.go b/node/impl/full/gas.go index 267d7e4ca..6ee79c93a 100644 --- a/node/impl/full/gas.go +++ b/node/impl/full/gas.go @@ -120,7 +120,7 @@ func (a *GasAPI) GasEstimateGasPremium(ctx context.Context, nblocksincl uint64, } premium := prev1 - if types.BigCmp(prev2, big.Zero()) != 0 { + if prev2.Sign() != 0 { premium = big.Div(types.BigAdd(prev1, prev2), types.NewInt(2)) }