Fix off by one
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
parent
64fa6fd9e5
commit
73e54352cd
@ -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