Merge branch 'vbuterin-patch-7' of github.com:ethereum/eth2.0-specs into vbuterin-patch-7

This commit is contained in:
Danny Ryan 2019-03-04 18:02:46 -07:00
commit 0f274a906c
No known key found for this signature in database
GPG Key ID: 2765A792E42CE07A
1 changed files with 7 additions and 3 deletions

View File

@ -2057,6 +2057,10 @@ def get_winning_root_and_participants(state: BeaconState, shard: Shard) -> Tuple
]
all_roots = [a.data.crosslink_data_root for a in valid_attestations]
# handle when no attestations for shard available
if len(all_roots) == 0:
return ZERO_HASH, []
def get_attestations_for(root) -> List[PendingAttestation]:
return [a for a in valid_attestations if a.data.crosslink_data_root == root]