Add duplicate elements warning to the docstring

This commit is contained in:
Hsiao-Wei Wang 2021-01-19 20:24:25 +08:00
parent c5d9aa2502
commit c877d142bd
No known key found for this signature in database
GPG Key ID: 1111A8A81778319E
1 changed files with 2 additions and 1 deletions

View File

@ -130,6 +130,7 @@ def eth2_fast_aggregate_verify(pubkeys: Sequence[BLSPubkey], message: Bytes32, s
def get_sync_committee_indices(state: BeaconState, epoch: Epoch) -> Sequence[ValidatorIndex]: def get_sync_committee_indices(state: BeaconState, epoch: Epoch) -> Sequence[ValidatorIndex]:
""" """
Return the sync committee indices for a given state and epoch. Return the sync committee indices for a given state and epoch.
Note that there may be duplicate indices in the resulting list.
""" """
MAX_RANDOM_BYTE = 2**8 - 1 MAX_RANDOM_BYTE = 2**8 - 1
base_epoch = Epoch((max(epoch // EPOCHS_PER_SYNC_COMMITTEE_PERIOD, 1) - 1) * EPOCHS_PER_SYNC_COMMITTEE_PERIOD) base_epoch = Epoch((max(epoch // EPOCHS_PER_SYNC_COMMITTEE_PERIOD, 1) - 1) * EPOCHS_PER_SYNC_COMMITTEE_PERIOD)