Skip to content

Commit 0751556

Browse files
fix(benchmark): relax gas validation rule for non benchmark mode (#2269)
1 parent d8523ed commit 0751556

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/ethereum_test_specs/blockchain.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -903,6 +903,10 @@ def execute(
903903
for block in self.blocks:
904904
blocks += [block.txs]
905905
# Pass gas validation params for benchmark tests
906+
# If not benchmark mode, skip gas used validation
907+
if self._operation_mode != OpMode.BENCHMARKING:
908+
self.skip_gas_used_validation = True
909+
906910
return TransactionPost(
907911
blocks=blocks,
908912
post=self.post,

src/ethereum_test_specs/state.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,9 @@ def execute(
445445
"""Generate the list of test fixtures."""
446446
if execute_format == TransactionPost:
447447
# Pass gas validation params for benchmark tests
448+
# If not benchmark mode, skip gas used validation
449+
if self._operation_mode != OpMode.BENCHMARKING:
450+
self.skip_gas_used_validation = True
448451
return TransactionPost(
449452
blocks=[[self.tx]],
450453
post=self.post,

0 commit comments

Comments
 (0)