internal: deref gasUsed pointer in eth_simulate log #33192 (#1794)

This commit is contained in:
wit liu 2025-12-04 10:33:22 +08:00 committed by GitHub
parent af7e479ce9
commit 8dd497dd01
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -255,7 +255,7 @@ func (sim *simulator) sanitizeCall(call *TransactionArgs, state *state.StateDB,
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