Skip to content

Commit

Permalink
Use Sign() to check zero-equality
Browse files Browse the repository at this point in the history
  • Loading branch information
arajasek committed Aug 31, 2020
1 parent 56235ae commit cfe5134
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion node/impl/full/gas.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}

Expand Down

0 comments on commit cfe5134

Please sign in to comment.