mirror of
https://github.com/ethereum/consensus-specs.git
synced 2026-02-01 21:45:15 -05:00
Fix is_valid_light_client_header
This commit is contained in:
@@ -167,11 +167,10 @@ def is_valid_light_client_header(header: LightClientHeader) -> bool:
|
||||
epoch = compute_epoch_at_slot(get_lc_beacon_slot(header))
|
||||
|
||||
if epoch < CAPELLA_FORK_EPOCH:
|
||||
if header.execution != ExecutionPayloadHeader():
|
||||
return False
|
||||
|
||||
if header.execution_branch != [Bytes32() for _ in range(floorlog2(EXECUTION_PAYLOAD_INDEX))]:
|
||||
return False
|
||||
return (
|
||||
header.execution == ExecutionPayloadHeader()
|
||||
and header.execution_branch == [Bytes32() for _ in range(floorlog2(EXECUTION_PAYLOAD_INDEX))]
|
||||
)
|
||||
|
||||
return is_valid_merkle_branch(
|
||||
leaf=get_lc_execution_root(header),
|
||||
|
||||
@@ -72,11 +72,10 @@ def is_valid_light_client_header(header: LightClientHeader) -> bool:
|
||||
return False
|
||||
|
||||
if epoch < CAPELLA_FORK_EPOCH:
|
||||
if header.execution != ExecutionPayloadHeader():
|
||||
return False
|
||||
|
||||
if header.execution_branch != [Bytes32() for _ in range(floorlog2(EXECUTION_PAYLOAD_INDEX))]:
|
||||
return False
|
||||
return (
|
||||
header.execution == ExecutionPayloadHeader()
|
||||
and header.execution_branch == [Bytes32() for _ in range(floorlog2(EXECUTION_PAYLOAD_INDEX))]
|
||||
)
|
||||
|
||||
return is_valid_merkle_branch(
|
||||
leaf=get_lc_execution_root(header),
|
||||
|
||||
Reference in New Issue
Block a user