Skip to content

Commit

Permalink
Update build/isnearupgrade.go
Browse files Browse the repository at this point in the history
Co-authored-by: Friðrik Ásmundsson <fridrik01@gmail.com>
  • Loading branch information
Stebalien and fridrik01 authored Nov 29, 2023
1 parent c8c7547 commit 449ff43
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion build/isnearupgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 449ff43

Please sign in to comment.