mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-01-12 19:54:34 +00:00
fix committee index assertion
This commit is contained in:
parent
2545c3e2d0
commit
417dda8326
@ -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
|
||||
```
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user