2021-07-02 05:41:45 +00:00
|
|
|
package version
|
|
|
|
|
|
|
|
import (
|
2021-11-10 07:08:33 +00:00
|
|
|
"github.com/nspcc-dev/neofs-sdk-go/version"
|
2021-07-02 05:41:45 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// IsValid checks if Version is not earlier than the genesis version of the NeoFS.
|
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
|
|
|
|
}
|