From 99d50108d0f3d0a867dab7785371d7cdd9b47065 Mon Sep 17 00:00:00 2001 From: Anton Nashatyrev Date: Fri, 30 Apr 2021 14:39:37 +0300 Subject: [PATCH] Replace unspecified SHARD_COUNT const with get_active_shard_count(previous_epoch) --- 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 7082b453b..bddc24a40 100644 --- a/specs/sharding/beacon-chain.md +++ b/specs/sharding/beacon-chain.md @@ -718,9 +718,10 @@ def charge_confirmed_header_fees(state: BeaconState) -> None: get_active_shard_count(state, get_current_epoch(state)) * SLOTS_PER_EPOCH * GASPRICE_ADJUSTMENT_COEFFICIENT ) - previous_epoch_start_slot = compute_start_slot_at_epoch(get_previous_epoch(state)) + previous_epoch = get_previous_epoch(state) + previous_epoch_start_slot = compute_start_slot_at_epoch(previous_epoch) for slot in range(previous_epoch_start_slot, previous_epoch_start_slot + SLOTS_PER_EPOCH): - for shard_index in range(SHARD_COUNT): + for shard_index in range(get_active_shard_count(state, previous_epoch)): shard = Shard(shard_index) confirmed_candidates = [ c for c in state.previous_epoch_pending_shard_headers