Skip to content

Commit 7771d27

Browse files
authored
fix(tests): accept tx- or block-level exception for over-budget block (EIP-7778) (#2949)
In test_multi_transaction_gas_accounting, a block whose included transaction exceeds the remaining block gas was expected to fail only with the block-level BlockException.GAS_USED_OVERFLOW. A client may legitimately report the same condition at the transaction level: EELS raises GasUsedExceedsLimitError (an InvalidTransaction subclass) when `tx.gas > gas_available`, and evmone reports it as a rejected transaction (GAS_LIMIT_REACHED). List both BlockException.GAS_USED_OVERFLOW and TransactionException.GAS_ALLOWANCE_EXCEEDED as acceptable so either categorization passes.
1 parent 14eca5d commit 7771d27

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tests/amsterdam/eip7778_block_gas_accounting_without_refunds/test_gas_accounting.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,10 @@ def test_multi_transaction_gas_accounting(
327327
blocks=[
328328
Block(
329329
txs=txs,
330-
exception=BlockException.GAS_USED_OVERFLOW
330+
exception=[
331+
BlockException.GAS_USED_OVERFLOW,
332+
TransactionException.GAS_ALLOWANCE_EXCEEDED,
333+
]
331334
if exceed_block_gas_limit
332335
else None,
333336
expected_gas_used=total_block_gas_used

0 commit comments

Comments
 (0)