Fix pre-condition checks in process_execution_payload

This commit is contained in:
Mikhail Kalinin 2021-04-08 20:14:34 +06:00
parent 13586cd9f8
commit 68b11ad4ad
1 changed files with 1 additions and 5 deletions

View File

@ -185,11 +185,7 @@ def process_execution_payload(state: BeaconState, body: BeaconBlockBody) -> None
execution_payload = body.execution_payload
if not is_transition_completed(state):
assert execution_payload == ExecutionPayload()
return
if not is_transition_block(state, body):
if is_transition_completed(state):
assert execution_payload.parent_hash == state.latest_execution_payload_header.block_hash
assert execution_payload.number == state.latest_execution_payload_header.number + 1