diff --git a/build/isnearupgrade.go b/build/isnearupgrade.go index 4273f0e9e3f..74975780fe1 100644 --- a/build/isnearupgrade.go +++ b/build/isnearupgrade.go @@ -5,5 +5,8 @@ import ( ) func IsNearUpgrade(epoch, upgradeEpoch abi.ChainEpoch) bool { + if upgradeEpoch < 0 { + return false + } return epoch > upgradeEpoch-Finality && epoch < upgradeEpoch+Finality }