File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2325,13 +2325,17 @@ iterator get_ptc*(state: gloas.BeaconState, slot: Slot):
23252325 epoch = slot.epoch ()
23262326 state_epoch = get_current_epoch (state)
23272327 slot_in_epoch = slot mod SLOTS_PER_EPOCH
2328- index =
2329- if epoch < state_epoch:
2330- doAssert epoch + 1 == state_epoch
2331- slot_in_epoch
2332- else :
2333- doAssert epoch <= state_epoch + MIN_SEED_LOOKAHEAD
2334- (epoch - state_epoch + 1 ).Epoch .start_slot.uint64 + slot_in_epoch
2328+
2329+ if epoch < state_epoch and epoch + 1 != state_epoch:
2330+ return
2331+ if epoch >= state_epoch and epoch > state_epoch + MIN_SEED_LOOKAHEAD :
2332+ return
2333+
2334+ let index =
2335+ if epoch < state_epoch:
2336+ slot_in_epoch
2337+ else :
2338+ (epoch - state_epoch + 1 ).Epoch .start_slot.uint64 + slot_in_epoch
23352339
23362340 for idx in state.ptc_window[index]:
23372341 yield ValidatorIndex (idx)
You can’t perform that action at this time.
0 commit comments