core: readability

This commit is contained in:
Marius van der Wijden 2026-04-08 11:18:31 +02:00
parent 03d4efd8df
commit 4e46fb1b8d

View file

@ -484,7 +484,7 @@ func (st *stateTransition) execute() (*ExecutionResult, error) {
if rules.IsAmsterdam {
// EIP-8037: total intrinsic must fit within the transaction gas limit.
if msg.GasLimit < gas.Sum() {
if gas.Sum() > msg.GasLimit {
return nil, fmt.Errorf("%w: have %d, want %d", ErrIntrinsicGas, msg.GasLimit, gas.Sum())
}
// EIP-8037: the regular gas consumption (intrinsic or floor) must fit within MaxTxGas.