2021-07-02 05:41:45 +00:00
|
|
|
package version
|
|
|
|
|
|
|
|
import (
|
2023-03-07 13:38:26 +00:00
|
|
|
"git.frostfs.info/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
|
|
|
|
}
|