Merge pull request #1910 from ericsson49/fix_get_best_light_client_aggregate

Fix exception in `get_best_light_client_aggregate`
This commit is contained in:
Diederik Loerakker 2020-06-18 02:16:58 +02:00 committed by GitHub
commit 3d544d5345
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -195,7 +195,10 @@ def get_best_light_client_aggregate(block: BeaconBlock,
aggregates: Sequence[LightClientVote]) -> LightClientVote:
viable_aggregates = [
aggregate for aggregate in aggregates
if aggregate.slot == compute_previous_slot(block.slot) and aggregate.beacon_block_root == block.parent_root
if (
aggregate.data.slot == compute_previous_slot(block.slot)
and aggregate.data.beacon_block_root == block.parent_root
)
]
return max(