[#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:
Evgenii Stratonikov 2022-10-17 21:43:17 +03:00 committed by fyrchik
parent 38246cd54f
commit beaef7b10d
3 changed files with 4 additions and 23 deletions

View file

@ -1 +1 @@
v0.16.0
v0.16.1

View file

@ -5,14 +5,14 @@ import "github.com/nspcc-dev/neo-go/pkg/interop/native/std"
const (
major = 0
minor = 16
patch = 0
patch = 1
// 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
// any migration routines.
prevMajor = 0
prevMinor = 15
prevPatch = 4
prevMinor = 16
prevPatch = 0
Version = major*1_000_000 + minor*1_000 + patch

View file

@ -94,25 +94,6 @@ func _deploy(data interface{}, isUpdate bool) {
if isUpdate {
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
}