diff --git a/build/isnearupgrade.go b/build/isnearupgrade.go new file mode 100644 index 000000000..4273f0e9e --- /dev/null +++ b/build/isnearupgrade.go @@ -0,0 +1,9 @@ +package build + +import ( + "github.com/filecoin-project/go-state-types/abi" +) + +func IsNearUpgrade(epoch, upgradeEpoch abi.ChainEpoch) bool { + return epoch > upgradeEpoch-Finality && epoch < upgradeEpoch+Finality +}