Skip to content

Commit 4490362

Browse files
committed
use applyMessageWithEVM result for maxGasUsed
1 parent 09e723b commit 4490362

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/ethapi/simulate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ func (sim *simulator) processBlock(ctx context.Context, block *simBlock, header,
305305
receipts[i] = core.MakeReceipt(evm, result, sim.state, blockContext.BlockNumber, common.Hash{}, blockContext.Time, tx, gasUsed, root)
306306
blobGasUsed += receipts[i].BlobGasUsed
307307
logs := tracer.Logs()
308-
callRes := simCallResult{ReturnValue: result.Return(), Logs: logs, GasUsed: hexutil.Uint64(result.UsedGas), MaxUsedGas: *call.Gas}
308+
callRes := simCallResult{ReturnValue: result.Return(), Logs: logs, GasUsed: hexutil.Uint64(result.UsedGas), MaxUsedGas: hexutil.Uint64(result.MaxUsedGas)}
309309
if result.Failed() {
310310
callRes.Status = hexutil.Uint64(types.ReceiptStatusFailed)
311311
if errors.Is(result.Err, vm.ErrExecutionReverted) {

0 commit comments

Comments
 (0)