From e403e961448ea50b562b61ecf3944cb9096c2d3c Mon Sep 17 00:00:00 2001 From: mratsim Date: Fri, 24 Aug 2018 10:20:15 +0200 Subject: [PATCH] indices_for_slot renaming - aligning to https://github.com/ethereum/beacon_chain/pull/62/commits/01abccfdbba6d88478f98be8164a217599884fcb --- beacon_chain/private/helpers.nim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/beacon_chain/private/helpers.nim b/beacon_chain/private/helpers.nim index a331a08fc..e263719bc 100644 --- a/beacon_chain/private/helpers.nim +++ b/beacon_chain/private/helpers.nim @@ -82,11 +82,11 @@ func get_indices_for_slot*(crystallized_state: CrystallizedState, slot: int64): seq[ShardAndCommittee] {.noInit.}= # TODO: Spec why is active_state an argument? - let ifh_start = crystallized_state.last_state_recalc - CYCLE_LENGTH - assert ifh_start <= slot - assert slot < ifh_start + CYCLE_LENGTH * 2 + let start = crystallized_state.last_state_recalc - CYCLE_LENGTH + assert start <= slot + assert slot < start + CYCLE_LENGTH * 2 - result = crystallized_state.indices_for_slots[int slot - ifh_start] + result = crystallized_state.indices_for_slots[int slot - start] # TODO, slot is an int64 will be an issue on int32 arch. # Clarify with EF if light clients will need the beacon chain