mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-01-19 23:19:28 +00:00
Deduplicate indices
This commit is contained in:
parent
2eda4c5dbc
commit
91e73c1f57
@ -195,7 +195,8 @@ def get_shard_committee(beacon_state: BeaconState, shard: Shard, epoch: Epoch) -
|
||||
# Every epoch cycle out validators from the older committee and cycle in validators from the newer committee
|
||||
older_subcommittee = [i for i in older_committee if i % EPOCHS_PER_SHARD_PERIOD > epoch % EPOCHS_PER_SHARD_PERIOD]
|
||||
newer_subcommittee = [i for i in newer_committee if i % EPOCHS_PER_SHARD_PERIOD <= epoch % EPOCHS_PER_SHARD_PERIOD]
|
||||
return older_subcommittee + newer_subcommittee
|
||||
# Deduplicate and sort indices
|
||||
return sorted(set(older_subcommittee + newer_subcommittee))
|
||||
```
|
||||
|
||||
#### `get_shard_proposer_index`
|
||||
|
Loading…
x
Reference in New Issue
Block a user