2020-12-19 21:10:45 +00:00
|
|
|
package build
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/filecoin-project/go-state-types/abi"
|
|
|
|
)
|
|
|
|
|
|
|
|
func IsNearUpgrade(epoch, upgradeEpoch abi.ChainEpoch) bool {
|
2023-11-29 12:50:05 +00:00
|
|
|
if upgradeEpoch < 0 {
|
|
|
|
return false
|
|
|
|
}
|
2020-12-19 21:10:45 +00:00
|
|
|
return epoch > upgradeEpoch-Finality && epoch < upgradeEpoch+Finality
|
|
|
|
}
|