Skip to content

Commit

Permalink
[#284] *: Update version and remove the old migration code
Browse files Browse the repository at this point in the history
Less chances to forget anything in the next release.

Signed-off-by: Evgenii Stratonikov <[email protected]>
  • Loading branch information
fyrchik committed Oct 18, 2022
1 parent 38246cd commit beaef7b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 23 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.16.0
v0.16.1
6 changes: 3 additions & 3 deletions common/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
19 changes: 0 additions & 19 deletions netmap/netmap_contract.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit beaef7b

Please sign in to comment.