mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-26 15:47:21 +00:00
ethapi: deref gasUsed pointer in eth_simulate log (#33192)
Show the actual gas used in the block limit error so RPC clients see useful numbers.
This commit is contained in:
parent
2a2f106a01
commit
5e6f7374de
1 changed files with 1 additions and 1 deletions
|
|
@ -377,7 +377,7 @@ func (sim *simulator) sanitizeCall(call *TransactionArgs, state vm.StateDB, head
|
|||
call.Gas = (*hexutil.Uint64)(&remaining)
|
||||
}
|
||||
if *gasUsed+uint64(*call.Gas) > blockContext.GasLimit {
|
||||
return &blockGasLimitReachedError{fmt.Sprintf("block gas limit reached: %d >= %d", gasUsed, blockContext.GasLimit)}
|
||||
return &blockGasLimitReachedError{fmt.Sprintf("block gas limit reached: %d >= %d", *gasUsed, blockContext.GasLimit)}
|
||||
}
|
||||
if err := call.CallDefaults(sim.gp.Gas(), header.BaseFee, sim.chainConfig.ChainID); err != nil {
|
||||
return err
|
||||
|
|
|
|||
Loading…
Reference in a new issue