Skip to content

Commit

Permalink
fix: build: an epoch is near an upgrade iff the upgrade is enabled (#…
Browse files Browse the repository at this point in the history
…11401)

This isn't a huge deal, but we'd otherwise consider the first finality
epochs (or so) to be "near" any disabled upgrade.
  • Loading branch information
Stebalien authored Nov 29, 2023
1 parent a34cc5e commit 8fec6e3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions 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 {
if upgradeEpoch < 0 {
return false
}
return epoch > upgradeEpoch-Finality && epoch < upgradeEpoch+Finality
}

0 comments on commit 8fec6e3

Please sign in to comment.