fix: build: an epoch is near an upgrade iff the upgrade is enabled (#11401)
This isn't a huge deal, but we'd otherwise consider the first finality epochs (or so) to be "near" any disabled upgrade.
This commit is contained in:
1 parent
a34cc5e4e9
commit
8fec6e31f2
1 file changed
+3
@@ -5,5 +5,8 @@ import (
|
||||
)
|
||||
|
||||
func IsNearUpgrade(epoch, upgradeEpoch abi.ChainEpoch) bool {
|
||||
if upgradeEpoch < 0 {
|
||||
return false
|
||||
}
|
||||
return epoch > upgradeEpoch-Finality && epoch < upgradeEpoch+Finality
|
||||
}
|
||||
Reference in new issue
Block a user