Cleanup: move var calculation down right before its usage

This commit is contained in:
Anton Nashatyrev 2021-04-22 22:08:44 +03:00
parent d7c276bcd5
commit 8f371f5627
1 changed files with 2 additions and 2 deletions

View File

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