From 449ff435cc1320287001a71f5b6036d7cb094694 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Wed, 29 Nov 2023 16:21:00 +0400 Subject: [PATCH] Update build/isnearupgrade.go MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Friðrik Ásmundsson --- build/isnearupgrade.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 }