From 2b48be8ef2157026b1723477b768d683b260a882 Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Thu, 20 Jun 2024 11:38:36 -0600 Subject: [PATCH] Don't double fetch header in DoEstimateGas --- internal/ethapi/api.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index e408502f4b..f5d5236e50 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -1279,10 +1279,6 @@ func DoEstimateGas(ctx context.Context, b Backend, args TransactionArgs, blockNr // Arbitrum: raise the gas cap to ignore L1 costs so that it's compute-only { - state, header, err := b.StateAndHeaderByNumberOrHash(ctx, blockNrOrHash) - if state == nil || err != nil { - return 0, err - } gasCap, err = args.L2OnlyGasCap(gasCap, header, state, core.MessageGasEstimationMode) if err != nil { return 0, err