Skip to content

Commit dd83fba

Browse files
authored
bug(tests): enforce transaction gas limit in Osaka (#1830)
1 parent 84cc036 commit dd83fba

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/cancun/eip5656_mcopy/test_mcopy_memory_expansion.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,17 @@ def block_gas_limit() -> int: # noqa: D103
115115

116116
@pytest.fixture
117117
def tx_gas_limit( # noqa: D103
118+
fork: Fork,
118119
call_exact_cost: int,
119120
block_gas_limit: int,
120121
successful: bool,
121122
) -> int:
122-
return min(call_exact_cost - (0 if successful else 1), block_gas_limit)
123+
return min(
124+
call_exact_cost - (0 if successful else 1),
125+
# If the transaction gas limit cap is not set (pre-osaka),
126+
# use the block gas limit
127+
fork.transaction_gas_limit_cap() or block_gas_limit,
128+
)
123129

124130

125131
@pytest.fixture

0 commit comments

Comments
 (0)