ethapi: fix block gas limit error message

This commit is contained in:
David Klank 2025-11-15 14:16:18 +02:00 committed by GitHub
parent 2a2f106a01
commit 63e8445a94
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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