Skip to content

Commit 1826382

Browse files
committed
types: Add newPayload validity
1 parent d64bbca commit 1826382

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

src/ethereum_test_tools/common/types.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2579,6 +2579,11 @@ class FixtureEngineNewPayload:
25792579
version: int = field(
25802580
json_encoder=JSONEncoder.Field(),
25812581
)
2582+
valid: bool = field(
2583+
json_encoder=JSONEncoder.Field(
2584+
skip_string_convert=True,
2585+
),
2586+
)
25822587
error_code: Optional[EngineAPIError] = field(
25832588
default=None,
25842589
json_encoder=JSONEncoder.Field(
@@ -2594,6 +2599,7 @@ def from_fixture_header(
25942599
header: FixtureHeader,
25952600
transactions: List[Transaction],
25962601
withdrawals: Optional[List[Withdrawal]],
2602+
valid: bool,
25972603
error_code: Optional[EngineAPIError],
25982604
) -> Optional["FixtureEngineNewPayload"]:
25992605
"""
@@ -2611,6 +2617,7 @@ def from_fixture_header(
26112617
withdrawals=withdrawals,
26122618
),
26132619
version=new_payload_version,
2620+
valid=valid,
26142621
error_code=error_code,
26152622
)
26162623

src/ethereum_test_tools/spec/blockchain_test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ def make_block(
220220
header=header,
221221
transactions=txs,
222222
withdrawals=env.withdrawals,
223+
valid=block.exception is None,
223224
error_code=block.engine_api_error_code,
224225
)
225226
if self.hive_enabled
@@ -259,7 +260,7 @@ def make_block(
259260
rlp=Bytes(block.rlp),
260261
expected_exception=block.exception,
261262
),
262-
fixture_payload,
263+
None,
263264
previous_env,
264265
previous_alloc,
265266
previous_head,

src/ethereum_test_tools/spec/state_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ def make_blocks(
194194
header=header,
195195
transactions=txs,
196196
withdrawals=env.withdrawals,
197+
valid=True,
197198
error_code=None,
198199
)
199200
else:

0 commit comments

Comments
 (0)