common: Disallow downgrading contracts #103
1 changed files with 1 additions and 1 deletions
|
@ -32,7 +32,7 @@ func CheckVersion(from int) {
|
||||||
if from < PrevVersion {
|
if from < PrevVersion {
|
||||||
panic(ErrVersionMismatch + ": expected >=" + std.Itoa(PrevVersion, 10))
|
panic(ErrVersionMismatch + ": expected >=" + std.Itoa(PrevVersion, 10))
|
||||||
}
|
}
|
||||||
if from == Version {
|
if Version <= from {
|
||||||
panic(ErrAlreadyUpdated + ": " + std.Itoa(Version, 10))
|
panic(ErrAlreadyUpdated + ": " + std.Itoa(Version, 10))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue