mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-03-01 18:50:35 +00:00
pr feedback
This commit is contained in:
parent
b1ea3b2667
commit
8da467df7c
@ -937,11 +937,14 @@ def get_crosslink_committees_at_slot(state: BeaconState,
|
|||||||
"""
|
"""
|
||||||
Returns the list of ``(committee, shard)`` tuples for the ``slot``.
|
Returns the list of ``(committee, shard)`` tuples for the ``slot``.
|
||||||
"""
|
"""
|
||||||
current_epoch_slot = get_current_epoch(state) * EPOCH_LENGTH
|
epoch = slot_to_epoch(slot)
|
||||||
assert current_epoch_slot <= slot + EPOCH_LENGTH
|
current_epoch = get_current_epoch(state)
|
||||||
assert slot < current_epoch_slot + EPOCH_LENGTH
|
previous_epoch = current_epoch - 1 if epoch > GENESIS_EPOCH else current_epoch
|
||||||
|
next_epoch = current_epoch + 1
|
||||||
|
|
||||||
if slot < current_epoch_slot:
|
assert previous_epoch <= epoch < next_epoch
|
||||||
|
|
||||||
|
if epoch < current_epoch:
|
||||||
committees_per_slot = get_previous_epoch_committee_count_per_slot(state)
|
committees_per_slot = get_previous_epoch_committee_count_per_slot(state)
|
||||||
seed = state.previous_epoch_seed
|
seed = state.previous_epoch_seed
|
||||||
shuffling_epoch = state.previous_calculation_epoch
|
shuffling_epoch = state.previous_calculation_epoch
|
||||||
|
Loading…
x
Reference in New Issue
Block a user