From 8ebc4dece847bb87daf3aa4ce6974ff37b60b2c2 Mon Sep 17 00:00:00 2001 From: Anton Nashatyrev Date: Fri, 11 Jan 2019 15:07:18 +0300 Subject: [PATCH] Local var should stay uint --- specs/core/0_beacon-chain.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/specs/core/0_beacon-chain.md b/specs/core/0_beacon-chain.md index 22e8c6dfe..c1668bd98 100644 --- a/specs/core/0_beacon-chain.md +++ b/specs/core/0_beacon-chain.md @@ -921,9 +921,10 @@ def get_shard_committees_at_slot(state: BeaconState, """ Returns the ``ShardCommittee`` for the ``slot``. """ - earliest_slot_in_array = state.slot - (state.slot % EPOCH_LENGTH) - EPOCH_LENGTH - assert earliest_slot_in_array <= slot < earliest_slot_in_array + EPOCH_LENGTH * 2 - return state.shard_committees_at_slots[slot - earliest_slot_in_array] + state_epoch_slot = state.slot - (state.slot % EPOCH_LENGTH) + assert state_epoch_slot <= slot + EPOCH_LENGTH + assert slot < state_epoch_slot + EPOCH_LENGTH + return state.shard_committees_at_slots[slot - state_epoch_slot + EPOCH_LENGTH] ``` #### `get_block_root`