Skip to content

Commit

Permalink
Merge pull request #3996 from jtraglia/shadowed-index-var
Browse files Browse the repository at this point in the history
  • Loading branch information
jtraglia authored Oct 27, 2024
2 parents 087e737 + 3a4101b commit 734938c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions specs/electra/beacon-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -572,10 +572,12 @@ def get_attesting_indices(state: BeaconState, attestation: Attestation) -> Set[V
output: Set[ValidatorIndex] = set()
committee_indices = get_committee_indices(attestation.committee_bits)
committee_offset = 0
for index in committee_indices:
committee = get_beacon_committee(state, attestation.data.slot, index)
for committee_index in committee_indices:
committee = get_beacon_committee(state, attestation.data.slot, committee_index)
committee_attesters = set(
index for i, index in enumerate(committee) if attestation.aggregation_bits[committee_offset + i])
attester_index for i, attester_index in enumerate(committee)
if attestation.aggregation_bits[committee_offset + i]
)
output = output.union(committee_attesters)

committee_offset += len(committee)
Expand Down

0 comments on commit 734938c

Please sign in to comment.