mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-09 13:56:23 +00:00
more logs to investigate epoch underflow/overflow https://github.com/status-im/nim-beacon-chain/issues/207
This commit is contained in:
parent
9b520d3949
commit
e8160c2126
@ -137,7 +137,7 @@ func get_crosslink_committees_at_slot*(state: BeaconState, slot: Slot|uint64,
|
|||||||
## ``slot`` in the next epoch -- with and without a `registry_change`
|
## ``slot`` in the next epoch -- with and without a `registry_change`
|
||||||
|
|
||||||
let
|
let
|
||||||
epoch = slot_to_epoch(slot)
|
epoch = slot_to_epoch(slot) # TODO, enforce slot to be a Slot
|
||||||
current_epoch = get_current_epoch(state)
|
current_epoch = get_current_epoch(state)
|
||||||
previous_epoch = get_previous_epoch(state)
|
previous_epoch = get_previous_epoch(state)
|
||||||
next_epoch = current_epoch + 1
|
next_epoch = current_epoch + 1
|
||||||
@ -145,11 +145,13 @@ func get_crosslink_committees_at_slot*(state: BeaconState, slot: Slot|uint64,
|
|||||||
doAssert previous_epoch <= epoch,
|
doAssert previous_epoch <= epoch,
|
||||||
"Previous epoch: " & $humaneEpochNum(previous_epoch) &
|
"Previous epoch: " & $humaneEpochNum(previous_epoch) &
|
||||||
", epoch: " & $humaneEpochNum(epoch) &
|
", epoch: " & $humaneEpochNum(epoch) &
|
||||||
|
" (slot: " & $humaneSlotNum(slot.Slot) & ")" &
|
||||||
", Next epoch: " & $humaneEpochNum(next_epoch)
|
", Next epoch: " & $humaneEpochNum(next_epoch)
|
||||||
|
|
||||||
doAssert epoch <= next_epoch,
|
doAssert epoch <= next_epoch,
|
||||||
"Previous epoch: " & $humaneEpochNum(previous_epoch) &
|
"Previous epoch: " & $humaneEpochNum(previous_epoch) &
|
||||||
", epoch: " & $humaneEpochNum(epoch) &
|
", epoch: " & $humaneEpochNum(epoch) &
|
||||||
|
" (slot: " & $humaneSlotNum(slot.Slot) & ")" &
|
||||||
", Next epoch: " & $humaneEpochNum(next_epoch)
|
", Next epoch: " & $humaneEpochNum(next_epoch)
|
||||||
|
|
||||||
template get_epoch_specific_params(): auto =
|
template get_epoch_specific_params(): auto =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user