fix committee index assertion

This commit is contained in:
protolambda 2021-06-01 22:38:36 +02:00
parent 2545c3e2d0
commit 417dda8326
No known key found for this signature in database
GPG Key ID: EC89FDBB2B4C7623

View File

@ -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
```