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 committed by Aayush Rajasekaran
parent 64fa6fd9e5
commit 73e54352cd

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
}
}