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