Fix off by one

Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
Jakub Sztandera 2020-09-09 20:50:04 +02:00
parent f7c1ceabe2
commit 371d7458bb
No known key found for this signature in database
GPG Key ID: 9A9AF56F8B3879BA

View File

@ -23,7 +23,7 @@ type Schedule []BeaconPoint
func (bs Schedule) BeaconForEpoch(e abi.ChainEpoch) RandomBeacon {
for i := len(bs) - 1; i >= 0; i-- {
bp := bs[i]
if e > bp.Start {
if e >= bp.Start {
return bp.Beacon
}
}