From 371d7458bb05883a89f6332be275326fef566f0c Mon Sep 17 00:00:00 2001 From: Jakub Sztandera Date: Wed, 9 Sep 2020 20:50:04 +0200 Subject: [PATCH] Fix off by one Signed-off-by: Jakub Sztandera --- chain/beacon/beacon.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chain/beacon/beacon.go b/chain/beacon/beacon.go index feeaa158e..9543bec54 100644 --- a/chain/beacon/beacon.go +++ b/chain/beacon/beacon.go @@ -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 } }