internal/ethapi: use overriden baseFee for gasPrice (#29051)

eth_call and debug_traceCall allow users to override various block fields, among them base fee. However the overriden base fee was not considered for computing the effective gas price of that message, and instead base fee of the base block was used. This has been fixed in this commit.
This commit is contained in:
ArtificialPB
2024-02-22 14:39:22 +01:00
committed by GitHub
parent b590cae892
commit e47a7c22c4
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -919,7 +919,7 @@ func (api *API) TraceCall(ctx context.Context, args ethapi.TransactionArgs, bloc
config.BlockOverrides.Apply(&vmctx)
}
// Execute the trace
msg, err := args.ToMessage(api.backend.RPCGasCap(), block.BaseFee())
msg, err := args.ToMessage(api.backend.RPCGasCap(), vmctx.BaseFee)
if err != nil {
return nil, err
}