[#284] *: Update version and remove the old migration code
Less chances to forget anything in the next release. Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
parent
38246cd54f
commit
beaef7b10d
3 changed files with 4 additions and 23 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
v0.16.0
|
v0.16.1
|
||||||
|
|
|
@ -5,14 +5,14 @@ import "github.com/nspcc-dev/neo-go/pkg/interop/native/std"
|
||||||
const (
|
const (
|
||||||
major = 0
|
major = 0
|
||||||
minor = 16
|
minor = 16
|
||||||
patch = 0
|
patch = 1
|
||||||
|
|
||||||
// Versions from which an update should be performed.
|
// Versions from which an update should be performed.
|
||||||
// These should be used in a group (so prevMinor can be equal to minor if there are
|
// These should be used in a group (so prevMinor can be equal to minor if there are
|
||||||
// any migration routines.
|
// any migration routines.
|
||||||
prevMajor = 0
|
prevMajor = 0
|
||||||
prevMinor = 15
|
prevMinor = 16
|
||||||
prevPatch = 4
|
prevPatch = 0
|
||||||
|
|
||||||
Version = major*1_000_000 + minor*1_000 + patch
|
Version = major*1_000_000 + minor*1_000 + patch
|
||||||
|
|
||||||
|
|
|
@ -94,25 +94,6 @@ func _deploy(data interface{}, isUpdate bool) {
|
||||||
|
|
||||||
if isUpdate {
|
if isUpdate {
|
||||||
common.CheckVersion(args.version)
|
common.CheckVersion(args.version)
|
||||||
|
|
||||||
count := getSnapshotCount(ctx)
|
|
||||||
prefix := []byte(snapshotKeyPrefix)
|
|
||||||
for i := 0; i < count; i++ {
|
|
||||||
key := append(prefix, byte(i))
|
|
||||||
data := storage.Get(ctx, key)
|
|
||||||
if data != nil {
|
|
||||||
nodes := std.Deserialize(data.([]byte)).([]Node)
|
|
||||||
for i := range nodes {
|
|
||||||
// Old structure contains only the first field,
|
|
||||||
// second is implicitly assumed to be Online.
|
|
||||||
nodes[i] = Node{
|
|
||||||
BLOB: nodes[i].BLOB,
|
|
||||||
State: NodeStateOnline,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
common.SetSerialized(ctx, key, nodes)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue