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.
This commit is contained in:
Matthieu Vachon 2024-03-26 00:01:13 -04:00 committed by GitHub
parent 100c0f47de
commit 738b5a586e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1186,9 +1186,6 @@ func DoEstimateGas(ctx context.Context, b Backend, args TransactionArgs, blockNr
return 0, err return 0, err
} }
call := args.ToMessage(header.BaseFee) call := args.ToMessage(header.BaseFee)
if err != nil {
return 0, err
}
// Run the gas estimation andwrap any revertals into a custom return // Run the gas estimation andwrap any revertals into a custom return
estimate, revert, err := gasestimator.Estimate(ctx, call, opts, gasCap) estimate, revert, err := gasestimator.Estimate(ctx, call, opts, gasCap)
if err != nil { if err != nil {
@ -1519,9 +1516,6 @@ func AccessList(ctx context.Context, b Backend, blockNrOrHash rpc.BlockNumberOrH
// Set the accesslist to the last al // Set the accesslist to the last al
args.AccessList = &accessList args.AccessList = &accessList
msg := args.ToMessage(header.BaseFee) msg := args.ToMessage(header.BaseFee)
if err != nil {
return nil, 0, nil, err
}
// Apply the transaction with the access list tracer // Apply the transaction with the access list tracer
tracer := logger.NewAccessListTracer(accessList, args.from(), to, precompiles) tracer := logger.NewAccessListTracer(accessList, args.from(), to, precompiles)