convert `shard` to `CommitteeIndex` using `compute_committee_index_from_shard`, based on @djrtwo comment

This commit is contained in:
ericsson 2021-04-27 17:07:56 +03:00
parent 4d684bd8d9
commit a0c30313fa
1 changed files with 2 additions and 1 deletions

View File

@ -683,7 +683,8 @@ def process_pending_headers(state: BeaconState) -> None:
continue continue
# The entire committee (and its balance) # The entire committee (and its balance)
full_committee = get_beacon_committee(state, slot, CommitteeIndex(shard)) index = compute_committee_index_from_shard(state, slot, shard)
full_committee = get_beacon_committee(state, slot, index)
# The set of voters who voted for each header (and their total balances) # The set of voters who voted for each header (and their total balances)
voting_sets = [ voting_sets = [
set(v for i, v in enumerate(full_committee) if c.votes[i]) set(v for i, v in enumerate(full_committee) if c.votes[i])