Merge pull request #2351 from Nashatyrev/fix/remove-obsolete-var

Sharding cleanup: Remove obsolete var, reorder calculation
This commit is contained in:
Danny Ryan 2021-04-22 15:39:38 -06:00 committed by GitHub
commit dcb013ccf2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -677,13 +677,12 @@ def process_pending_headers(state: BeaconState) -> None:
c for c in state.previous_epoch_pending_shard_headers c for c in state.previous_epoch_pending_shard_headers
if (c.slot, c.shard) == (slot, shard) if (c.slot, c.shard) == (slot, shard)
] ]
# The entire committee (and its balance)
full_committee = get_beacon_committee(state, slot, shard)
full_committee_balance = get_total_balance(state, full_committee)
# If any candidates already confirmed, skip # If any candidates already confirmed, skip
if True in [c.confirmed for c in candidates]: if True in [c.confirmed for c in candidates]:
continue continue
# The entire committee (and its balance)
full_committee = get_beacon_committee(state, slot, shard)
# 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 = [
[v for i, v in enumerate(full_committee) if c.votes[i]] [v for i, v in enumerate(full_committee) if c.votes[i]]