good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit e9572ae9 authored by Ricardo Guilherme Schmidt's avatar Ricardo Guilherme Schmidt Committed by GitHub
Browse files

Fix infinite rpc.gascap on eth_estimateGas (#1292)

* Fix infinite rpc.gascap on eth_estimateGas

* use `gasCap.Sign() > 0` instead of `gasCap.Uint64() != 0`
parent c2f41d77
No related branches found
No related tags found
No related merge requests found
......@@ -106,7 +106,7 @@ func (api *APIImpl) DoEstimateGas(ctx context.Context, args ethapi.CallArgs, blo
}
}
// Recap the highest gas allowance with specified gascap.
if gasCap != nil && hi > gasCap.Uint64() {
if gasCap != nil && gasCap.Sign() > 0 && hi > gasCap.Uint64() {
log.Warn("Caller gas above allowance, capping", "requested", hi, "cap", gasCap)
hi = gasCap.Uint64()
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment