mirror of
https://github.com/ethereum/consensus-specs.git
synced 2026-02-01 23:05:12 -05:00
fix committee index assertion
This commit is contained in:
@@ -480,7 +480,7 @@ def compute_committee_index_from_shard(state: BeaconState, slot: Slot, shard: Sh
|
||||
epoch = compute_epoch_at_slot(slot)
|
||||
active_shards = get_active_shard_count(state, epoch)
|
||||
index = CommitteeIndex((active_shards + shard - get_start_shard(state, slot)) % active_shards)
|
||||
assert index >= get_committee_count_per_slot(state, epoch)
|
||||
assert index < get_committee_count_per_slot(state, epoch)
|
||||
return index
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user