Fix off by one
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
parent
f7c1ceabe2
commit
371d7458bb
@ -23,7 +23,7 @@ type Schedule []BeaconPoint
|
|||||||
func (bs Schedule) BeaconForEpoch(e abi.ChainEpoch) RandomBeacon {
|
func (bs Schedule) BeaconForEpoch(e abi.ChainEpoch) RandomBeacon {
|
||||||
for i := len(bs) - 1; i >= 0; i-- {
|
for i := len(bs) - 1; i >= 0; i-- {
|
||||||
bp := bs[i]
|
bp := bs[i]
|
||||||
if e > bp.Start {
|
if e >= bp.Start {
|
||||||
return bp.Beacon
|
return bp.Beacon
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user