convert `shard` to `CommitteeIndex` when passing to `get_beacon_committee`
This commit is contained in:
parent
f2c47debb9
commit
17bc3c1c72
|
@ -671,7 +671,8 @@ def process_pending_headers(state: BeaconState) -> None:
|
|||
previous_epoch = get_previous_epoch(state)
|
||||
previous_epoch_start_slot = compute_start_slot_at_epoch(previous_epoch)
|
||||
for slot in range(previous_epoch_start_slot, previous_epoch_start_slot + SLOTS_PER_EPOCH):
|
||||
for shard in range(get_active_shard_count(state, previous_epoch)):
|
||||
for shard_index in range(get_active_shard_count(state, previous_epoch)):
|
||||
shard = Shard(shard_index)
|
||||
# Pending headers for this (slot, shard) combo
|
||||
candidates = [
|
||||
c for c in state.previous_epoch_pending_shard_headers
|
||||
|
@ -682,7 +683,7 @@ def process_pending_headers(state: BeaconState) -> None:
|
|||
continue
|
||||
|
||||
# The entire committee (and its balance)
|
||||
full_committee = get_beacon_committee(state, slot, shard)
|
||||
full_committee = get_beacon_committee(state, slot, CommitteeIndex(shard))
|
||||
# The set of voters who voted for each header (and their total balances)
|
||||
voting_sets = [
|
||||
set(v for i, v in enumerate(full_committee) if c.votes[i])
|
||||
|
|
Loading…
Reference in New Issue