Skip to content

Commit

Permalink
Merge pull request #2359 from ericsson49/ericsson49/fix_pass_set_inst…
Browse files Browse the repository at this point in the history
…ead_of_sequence_to_get_total_balance

Fix: pass Set instead of Sequence to get_total_balance
  • Loading branch information
protolambda authored Apr 26, 2021
2 parents fd9c96d + d99cfee commit ac98da6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions specs/sharding/beacon-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ def update_pending_votes(state: BeaconState, attestation: Attestation) -> None:
participants = get_attesting_indices(state, attestation.data, pending_header.votes)
participants_balance = get_total_balance(state, participants)
full_committee = get_beacon_committee(state, attestation.data.slot, attestation.data.index)
full_committee_balance = get_total_balance(state, full_committee)
full_committee_balance = get_total_balance(state, set(full_committee))
if participants_balance * 3 >= full_committee_balance * 2:
pending_header.confirmed = True
```
Expand Down Expand Up @@ -685,7 +685,7 @@ def process_pending_headers(state: BeaconState) -> None:
full_committee = get_beacon_committee(state, slot, shard)
# The set of voters who voted for each header (and their total balances)
voting_sets = [
[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])
for c in candidates
]
voting_balances = [
Expand Down

0 comments on commit ac98da6

Please sign in to comment.