Skip to content

Commit e0dbd07

Browse files
committed
internal/ethapi: set default fees before gas estimation
1 parent 8fd9c7b commit e0dbd07

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/ethapi/api.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,6 +1284,9 @@ func DoEstimateGas(ctx context.Context, b Backend, args TransactionArgs, blockNr
12841284
// configuration (if non-zero).
12851285
// Note: Required blob gas is not computed in this method.
12861286
func (s *BlockChainAPI) EstimateGas(ctx context.Context, args TransactionArgs, blockNrOrHash *rpc.BlockNumberOrHash, overrides *StateOverride) (hexutil.Uint64, error) {
1287+
if err := args.setFeeDefaults(ctx, s.b); err != nil {
1288+
return 0, err
1289+
}
12871290
bNrOrHash := rpc.BlockNumberOrHashWithNumber(rpc.LatestBlockNumber)
12881291
if blockNrOrHash != nil {
12891292
bNrOrHash = *blockNrOrHash

0 commit comments

Comments
 (0)