internal/ethapi: fix nil deref + fix estimateGas console bindings (#21601)
* tried to fix * fix for js api * fix for nil pointer ex * rev space * rev space * input call formatter
This commit is contained in:
committed by
GitHub
parent
e5defccd58
commit
c1544423d6
@ -963,6 +963,9 @@ func DoEstimateGas(ctx context.Context, b Backend, args CallArgs, blockNrOrHash
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
if block == nil {
|
||||
return 0, errors.New("block not found")
|
||||
}
|
||||
hi = block.GasLimit()
|
||||
}
|
||||
// Recap the highest gas limit with account's available balance.
|
||||
|
Reference in New Issue
Block a user