Use Sign() to check zero-equality
This commit is contained in:
parent
56235aee90
commit
cfe5134375
@ -120,7 +120,7 @@ func (a *GasAPI) GasEstimateGasPremium(ctx context.Context, nblocksincl uint64,
|
|||||||
}
|
}
|
||||||
|
|
||||||
premium := prev1
|
premium := prev1
|
||||||
if types.BigCmp(prev2, big.Zero()) != 0 {
|
if prev2.Sign() != 0 {
|
||||||
premium = big.Div(types.BigAdd(prev1, prev2), types.NewInt(2))
|
premium = big.Div(types.BigAdd(prev1, prev2), types.NewInt(2))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user