From 5fc7474447abf3d60dcb770fe040fd5088a7e50b Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Fri, 25 Mar 2022 14:48:11 +0300 Subject: [PATCH] [#232] *: Remove old update code Signed-off-by: Evgenii Stratonikov --- neofs/neofs_contract.go | 9 --------- netmap/netmap_contract.go | 19 ------------------- 2 files changed, 28 deletions(-) diff --git a/neofs/neofs_contract.go b/neofs/neofs_contract.go index 863c221..5fcfdfb 100644 --- a/neofs/neofs_contract.go +++ b/neofs/neofs_contract.go @@ -51,15 +51,6 @@ func _deploy(data interface{}, isUpdate bool) { if isUpdate { args := data.([]interface{}) common.CheckVersion(args[len(args)-1].(int)) - - data := storage.Get(ctx, alphabetKey) - alphabetNodes := std.Deserialize(data.([]byte)).([]common.IRNode) - - pubs := []interop.PublicKey{} - for i := range alphabetNodes { - pubs = append(pubs, alphabetNodes[i].PublicKey) - } - common.SetSerialized(ctx, alphabetKey, pubs) return } diff --git a/netmap/netmap_contract.go b/netmap/netmap_contract.go index 6f04593..5070d6b 100644 --- a/netmap/netmap_contract.go +++ b/netmap/netmap_contract.go @@ -88,25 +88,6 @@ func _deploy(data interface{}, isUpdate bool) { if isUpdate { common.CheckVersion(args.version) - - data := storage.Get(ctx, "snapshotPrevious") - storage.Put(ctx, snapshotKeyPrefix+"0", data) - - data = storage.Get(ctx, "snapshotCurrent") - storage.Put(ctx, snapshotKeyPrefix+"1", data) - - storage.Put(ctx, snapshotCurrentIDKey, 1) - - if args.notaryDisabled { - data = storage.Get(ctx, innerRingKey) - irNodes := std.Deserialize(data.([]byte)).([]common.IRNode) - - pubs := []interop.PublicKey{} - for i := range irNodes { - pubs = append(pubs, irNodes[i].PublicKey) - } - common.SetSerialized(ctx, innerRingKey, pubs) - } return }