Skip to content

Commit a938d57

Browse files
refactor: adjust gas usage assertion for only Osaka fork
1 parent efe9de9 commit a938d57

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/osaka/eip7883_modexp_gas_increase/test_modexp_thresholds.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import pytest
99

1010
from ethereum_test_checklists import EIPChecklist
11+
from ethereum_test_forks import Fork, Osaka
1112
from ethereum_test_tools import (
1213
Alloc,
1314
Environment,
@@ -637,10 +638,12 @@ def test_modexp_variable_gas_cost(
637638
gas_usage: int,
638639
pre: Alloc,
639640
tx: Transaction,
641+
fork: Fork,
640642
post: Dict,
641643
):
642644
"""Test ModExp variable gas cost."""
643-
assert (gas_usage is None) or (precompile_gas == gas_usage), "inconsistent gas usage"
645+
if fork >= Osaka:
646+
assert (gas_usage is None) or (precompile_gas >= gas_usage), "inconsistent gas usage"
644647
state_test(pre=pre, tx=tx, post=post)
645648

646649

0 commit comments

Comments
 (0)