mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-20 14:59:26 +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)
|
call.Gas = (*hexutil.Uint64)(&remaining)
|
||||||
}
|
}
|
||||||
if *gasUsed+uint64(*call.Gas) > blockContext.GasLimit {
|
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 {
|
if err := call.CallDefaults(sim.gp.Gas(), header.BaseFee, sim.chainConfig.ChainID); err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue