Update specs/core/0_beacon-chain.md

Co-Authored-By: vbuterin <v@buterin.com>
This commit is contained in:
Danny Ryan 2019-01-10 21:01:30 -06:00 committed by GitHub
parent 648c35dc3d
commit 7736843917
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -916,7 +916,7 @@ def get_current_epoch_committee_count_per_slot(state: BeaconState) -> int:
def get_shard_committees_at_slot(state: BeaconState, def get_shard_committees_at_slot(state: BeaconState,
slot: int) -> List[Tuple[List[int], int]]: slot: int) -> List[Tuple[List[int], int]]:
""" """
Returns (i) the list of committees and (ii) the shard associated with the first committee for the ``slot``. Returns the list of ``(committee, shard)`` tuples for the ``slot``.
""" """
earliest_slot = state.slot - (state.slot % EPOCH_LENGTH) - EPOCH_LENGTH earliest_slot = state.slot - (state.slot % EPOCH_LENGTH) - EPOCH_LENGTH
assert earliest_slot <= slot < earliest_slot + EPOCH_LENGTH * 2 assert earliest_slot <= slot < earliest_slot + EPOCH_LENGTH * 2