2021-07-02 05:41:45 +00:00
|
|
|
package version
|
|
|
|
|
|
|
|
import (
|
2022-12-23 17:35:35 +00:00
|
|
|
"github.com/TrueCloudLab/frostfs-sdk-go/version"
|
2021-07-02 05:41:45 +00:00
|
|
|
)
|
|
|
|
|
2023-02-05 15:59:38 +00:00
|
|
|
// IsValid checks if Version is not earlier than the genesis version of the FrostFS.
|
2021-11-10 07:08:33 +00:00
|
|
|
func IsValid(v version.Version) bool {
|
2021-07-02 05:41:45 +00:00
|
|
|
const (
|
|
|
|
startMajor = 2
|
|
|
|
startMinor = 7
|
|
|
|
)
|
|
|
|
|
|
|
|
mjr := v.Major()
|
|
|
|
|
|
|
|
return mjr > startMajor || mjr == startMajor && v.Minor() >= startMinor
|
|
|
|
}
|