mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-02-17 00:47:03 +00:00
fix findShufflingRef
slot compute around genesis (#4910)
`dependent_slot` for epoch 2 is epoch 1's start slot - 1, not 0.
This commit is contained in:
parent
a35c2c15b0
commit
a09b05bc27
@ -474,7 +474,7 @@ func findShufflingRef*(
|
|||||||
## Lookup a shuffling in the cache, returning `none` if it's not present - see
|
## Lookup a shuffling in the cache, returning `none` if it's not present - see
|
||||||
## `getShufflingRef` for a version that creates a new instance if it's missing
|
## `getShufflingRef` for a version that creates a new instance if it's missing
|
||||||
let
|
let
|
||||||
dependent_slot = if epoch > 2: (epoch - 1).start_slot() - 1 else: Slot(0)
|
dependent_slot = if epoch >= 2: (epoch - 1).start_slot() - 1 else: Slot(0)
|
||||||
dependent_bsi = dag.atSlot(bid, dependent_slot).valueOr:
|
dependent_bsi = dag.atSlot(bid, dependent_slot).valueOr:
|
||||||
return Opt.none(ShufflingRef)
|
return Opt.none(ShufflingRef)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user