From 738b5a586e329965539877434b695bb61015d4c7 Mon Sep 17 00:00:00 2001 From: Matthieu Vachon Date: Tue, 26 Mar 2024 00:01:13 -0400 Subject: [PATCH] Removes some leftover `err` check (#29339) Before, `ToMessage` was returning both the resulting `Message` and an error while no error is returned now. Those error checks were probably leftover from the past. --- internal/ethapi/api.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index 6009d70031..c5a99588e6 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -1186,9 +1186,6 @@ func DoEstimateGas(ctx context.Context, b Backend, args TransactionArgs, blockNr return 0, err } call := args.ToMessage(header.BaseFee) - if err != nil { - return 0, err - } // Run the gas estimation andwrap any revertals into a custom return estimate, revert, err := gasestimator.Estimate(ctx, call, opts, gasCap) if err != nil { @@ -1519,9 +1516,6 @@ func AccessList(ctx context.Context, b Backend, blockNrOrHash rpc.BlockNumberOrH // Set the accesslist to the last al args.AccessList = &accessList msg := args.ToMessage(header.BaseFee) - if err != nil { - return nil, 0, nil, err - } // Apply the transaction with the access list tracer tracer := logger.NewAccessListTracer(accessList, args.from(), to, precompiles)