common: Disallow downgrading contracts #103

Merged
fyrchik merged 1 commit from fyrchik/frostfs-contract:disallow-downgrade into master 2024-08-19 12:28:46 +00:00

View file

@ -32,7 +32,7 @@ func CheckVersion(from int) {
if from < PrevVersion {
panic(ErrVersionMismatch + ": expected >=" + std.Itoa(PrevVersion, 10))
}
if from == Version {
if Version <= from {
panic(ErrAlreadyUpdated + ": " + std.Itoa(Version, 10))
}
}