Skip to content

Commit 2c2c117

Browse files
authored
chore(fill): remove fill warnings (#1964)
* chore(fw): remove fill warnings. * chore(fw): refactor.
1 parent e485960 commit 2c2c117

File tree

2 files changed

+2
-18
lines changed

2 files changed

+2
-18
lines changed

src/ethereum_test_specs/blockchain.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"""Ethereum blockchain test spec definition and filler."""
22

3-
import warnings
43
from pprint import pprint
54
from typing import Any, Callable, ClassVar, Dict, Generator, List, Optional, Sequence, Tuple, Type
65

@@ -173,7 +172,7 @@ def apply(self, target: FixtureHeader) -> FixtureHeader:
173172

174173
def verify(self, target: FixtureHeader):
175174
"""Verify that the header fields from self are as expected."""
176-
for field_name in self.model_fields:
175+
for field_name in self.__class__.model_fields:
177176
baseline_value = getattr(self, field_name)
178177
if baseline_value is not None:
179178
assert baseline_value is not Header.REMOVE_FIELD, "invalid header"
@@ -494,16 +493,7 @@ def generate_block_data(
494493
"""Generate common block data for both make_fixture and make_hive_fixture."""
495494
env = block.set_environment(previous_env)
496495
env = env.set_fork_requirements(fork)
497-
498-
txs: List[Transaction] = []
499-
for tx in block.txs:
500-
if not self.is_tx_gas_heavy_test() and tx.gas_limit >= Environment().gas_limit:
501-
warnings.warn(
502-
f"{self.node_id()} uses a high Transaction gas_limit: {tx.gas_limit}",
503-
stacklevel=2,
504-
)
505-
506-
txs.append(tx.with_signature_and_sender())
496+
txs = [tx.with_signature_and_sender() for tx in block.txs]
507497

508498
if failing_tx_count := len([tx for tx in txs if tx.error]) > 0:
509499
if failing_tx_count > 1:

src/ethereum_test_specs/state.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"""Ethereum state test spec definition and filler."""
22

3-
import warnings
43
from pprint import pprint
54
from typing import Any, Callable, ClassVar, Dict, Generator, List, Optional, Sequence, Type
65

@@ -174,11 +173,6 @@ def make_state_test_fixture(
174173

175174
env = self.env.set_fork_requirements(fork)
176175
tx = self.tx.with_signature_and_sender(keep_secret_key=True)
177-
if not self.is_tx_gas_heavy_test() and tx.gas_limit >= Environment().gas_limit:
178-
warnings.warn(
179-
f"{self.node_id()} uses a high Transaction gas_limit: {tx.gas_limit}",
180-
stacklevel=2,
181-
)
182176
pre_alloc = Alloc.merge(
183177
Alloc.model_validate(fork.pre_allocation()),
184178
self.pre,

0 commit comments

Comments
 (0)