From e3c95e967cdbe57babcc86c1dcda9f68801c4e46 Mon Sep 17 00:00:00 2001 From: ericsson Date: Tue, 27 Apr 2021 17:09:16 +0300 Subject: [PATCH] use `committee_index` instead of `shard` --- specs/sharding/beacon-chain.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/specs/sharding/beacon-chain.md b/specs/sharding/beacon-chain.md index 7916c0364..2ddcc6a82 100644 --- a/specs/sharding/beacon-chain.md +++ b/specs/sharding/beacon-chain.md @@ -756,8 +756,9 @@ def reset_pending_headers(state: BeaconState) -> None: next_epoch_start_slot = compute_start_slot_at_epoch(next_epoch) for slot in range(next_epoch_start_slot, next_epoch_start_slot + SLOTS_PER_EPOCH): for index in range(get_committee_count_per_slot(state, next_epoch)): - shard = compute_shard_from_committee_index(state, slot, CommitteeIndex(index)) - committee_length = len(get_beacon_committee(state, slot, CommitteeIndex(shard))) + committee_index = CommitteeIndex(index) + shard = compute_shard_from_committee_index(state, slot, committee_index) + committee_length = len(get_beacon_committee(state, slot, committee_index)) state.current_epoch_pending_shard_headers.append(PendingShardHeader( slot=slot, shard=shard,