mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
internal/ethapi: fix test
This commit is contained in:
parent
e7865d63d2
commit
92d1f2f9ff
1 changed files with 5 additions and 5 deletions
|
|
@ -1200,16 +1200,16 @@ func DoEstimateGas(ctx context.Context, b Backend, args TransactionArgs, blockNr
|
|||
ErrorRatio: estimateGasErrorRatio,
|
||||
}
|
||||
// Set any required transaction default, but make sure the gas cap itself is not messed with
|
||||
nilGas := args.Gas == nil
|
||||
// if it was not specified in the original argument list.
|
||||
if args.Gas == nil {
|
||||
args.Gas = new(hexutil.Uint64)
|
||||
}
|
||||
if err := args.CallDefaults(gasCap, header.BaseFee, b.ChainConfig().ChainID); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
if nilGas && args.Gas != nil {
|
||||
args.Gas = nil
|
||||
}
|
||||
call := args.ToMessage(header.BaseFee)
|
||||
|
||||
// Run the gas estimation and wrap any revertals into a custom return
|
||||
// Run the gas estimation and wrap any revertals into a custom return
|
||||
estimate, revert, err := gasestimator.Estimate(ctx, call, opts, gasCap)
|
||||
if err != nil {
|
||||
if len(revert) > 0 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue