From f7fab30772b6d70c4a2f84acc171a0432575394e Mon Sep 17 00:00:00 2001 From: Danny Ryan Date: Tue, 19 Mar 2019 11:40:24 -0600 Subject: [PATCH] minor adjustment to not repeat committe count calc --- specs/core/0_beacon-chain.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/specs/core/0_beacon-chain.md b/specs/core/0_beacon-chain.md index e21607010..9563e22bb 100644 --- a/specs/core/0_beacon-chain.md +++ b/specs/core/0_beacon-chain.md @@ -908,14 +908,13 @@ def get_crosslink_committees_at_slot(state: BeaconState, shuffling_start_shard = state.current_shuffling_start_shard indices = get_active_validator_indices(state.validator_registry, shuffling_epoch) - committee_count = get_epoch_committee_count(len(indices)) - committees_per_slot = committee_count // SLOTS_PER_EPOCH + committees_per_slot = committees_per_epoch // SLOTS_PER_EPOCH offset = slot % SLOTS_PER_EPOCH slot_start_shard = (shuffling_start_shard + committees_per_slot * offset) % SHARD_COUNT return [ ( - compute_committee(indices, seed, committees_per_slot * offset + i, committee_count), + compute_committee(indices, seed, committees_per_slot * offset + i, committees_per_epoch), (slot_start_shard + i) % SHARD_COUNT, ) for i in range(committees_per_slot)