*: remove update migration code

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2022-02-01 11:36:18 +03:00 committed by Alex Vanin
parent 74e4bbb6b9
commit b0872bb54c
9 changed files with 4 additions and 28 deletions

View file

@ -37,7 +37,6 @@ func _deploy(data interface{}, isUpdate bool) {
if isUpdate {
args := data.([]interface{})
common.CheckVersion(args[len(args)-1].(int))
storage.Delete(ctx, common.LegacyOwnerKey)
return
}

View file

@ -47,7 +47,6 @@ func _deploy(data interface{}, isUpdate bool) {
if isUpdate {
args := data.([]interface{})
common.CheckVersion(args[len(args)-1].(int))
storage.Delete(ctx, common.LegacyOwnerKey)
return
}

View file

@ -63,7 +63,6 @@ func _deploy(data interface{}, isUpdate bool) {
if isUpdate {
args := data.([]interface{})
common.CheckVersion(args[len(args)-1].(int))
storage.Delete(ctx, common.LegacyOwnerKey)
return
}

View file

@ -47,22 +47,8 @@ var (
// _deploy sets up initial alphabet node keys.
func _deploy(data interface{}, isUpdate bool) {
if isUpdate {
// TODO(@fyrchik): restore after mainnet update
// args := data.([]interface{})
// common.CheckVersion(args[len(args)-1].(int))
ctx := storage.GetContext()
// TODO(@fyrchik): remove after mainnet update
storage.Delete(ctx, common.LegacyOwnerKey)
nodes := getNodes(ctx, candidatesKey)
storage.Delete(ctx, candidatesKey)
for i := range nodes {
key := append([]byte(candidatesKey), nodes[i].PublicKey...)
storage.Put(ctx, key, []byte{1})
}
args := data.([]interface{})
common.CheckVersion(args[len(args)-1].(int))
return
}

View file

@ -34,7 +34,6 @@ func _deploy(data interface{}, isUpdate bool) {
if isUpdate {
args := data.([]interface{})
common.CheckVersion(args[len(args)-1].(int))
storage.Delete(ctx, common.LegacyOwnerKey)
return
}

View file

@ -85,7 +85,6 @@ func _deploy(data interface{}, isUpdate bool) {
if isUpdate {
common.CheckVersion(args.version)
storage.Delete(ctx, common.LegacyOwnerKey)
return
}

View file

@ -7,7 +7,6 @@ import (
"github.com/nspcc-dev/neo-go/pkg/interop/native/management"
"github.com/nspcc-dev/neo-go/pkg/interop/native/neo"
"github.com/nspcc-dev/neo-go/pkg/interop/runtime"
"github.com/nspcc-dev/neo-go/pkg/interop/storage"
"github.com/nspcc-dev/neofs-contract/common"
)
@ -21,10 +20,8 @@ func OnNEP17Payment(from interop.Hash160, amount int, data interface{}) {
func _deploy(data interface{}, isUpdate bool) {
if isUpdate {
ctx := storage.GetContext()
args := data.([]interface{})
common.CheckVersion(args[len(args)-1].(int))
storage.Delete(ctx, common.LegacyOwnerKey)
return
}

View file

@ -23,8 +23,6 @@ func _deploy(data interface{}, isUpdate bool) {
if isUpdate {
args := data.([]interface{})
common.CheckVersion(args[len(args)-1].(int))
storage.Delete(ctx, []byte("contractOwner"))
return
}

View file

@ -58,8 +58,8 @@ const (
// _deploy function sets up initial list of inner ring public keys.
func _deploy(data interface{}, isUpdate bool) {
if isUpdate {
//args := data.([]interface{})
//common.CheckVersion(args[len(args)-1].(int))
args := data.([]interface{})
common.CheckVersion(args[len(args)-1].(int))
return
}