From c3a7c6ad23cd149b0dbeb06768db2aa5dcb48c58 Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Wed, 24 Mar 2021 11:18:16 +0300 Subject: [PATCH] [#58] common: Remove unused functions Signed-off-by: Alex Vanin --- common/ir.go | 50 -------------------------------------------------- 1 file changed, 50 deletions(-) diff --git a/common/ir.go b/common/ir.go index 12903a0..d817675 100644 --- a/common/ir.go +++ b/common/ir.go @@ -7,13 +7,6 @@ import ( "github.com/nspcc-dev/neo-go/pkg/interop/native/neo" "github.com/nspcc-dev/neo-go/pkg/interop/native/roles" "github.com/nspcc-dev/neo-go/pkg/interop/runtime" - "github.com/nspcc-dev/neo-go/pkg/interop/storage" -) - -const ( - irListMethod = "innerRingList" - multiaddrMethod = "multiaddress" - committeeMethod = "committee" ) type IRNode struct { @@ -32,49 +25,6 @@ func InnerRingInvoker(ir []IRNode) interop.PublicKey { return nil } -// InnerRingList returns list of inner ring nodes through calling -// "innerRingList" method of smart contract. -// -// Address of smart contract is received from storage by key. -func InnerRingListViaStorage(ctx storage.Context, key interface{}) []IRNode { - sc := storage.Get(ctx, key).(interop.Hash160) - return InnerRingList(sc) -} - -// InnerRingList gets list of inner ring through -// calling "innerRingList" method of smart contract. -func InnerRingList(sc interop.Hash160) []IRNode { - return contract.Call(sc, irListMethod, contract.ReadOnly).([]IRNode) -} - -// InnerRingMultiAddressViaStorage returns multiaddress of inner ring public -// keys by invoking netmap contract, which scripthash stored in the contract -// storage by the key `key`. -func InnerRingMultiAddressViaStorage(ctx storage.Context, key interface{}) []byte { - sc := storage.Get(ctx, key).(interop.Hash160) - return InnerRingMultiAddress(sc) -} - -// InnerRingMultiAddress returns multiaddress of inner ring public keys by -// invoking netmap contract. -func InnerRingMultiAddress(sc interop.Hash160) []byte { - return contract.Call(sc, multiaddrMethod, contract.ReadOnly).([]byte) -} - -// CommitteeMultiAddressViaStorage returns multiaddress of committee public -// keys by invoking netmap contract, which scripthash stored in the contract -// storage by the key `key`. -func CommitteeMultiAddressViaStorage(ctx storage.Context, key interface{}) []byte { - sc := storage.Get(ctx, key).(interop.Hash160) - return CommitteeMultiAddress(sc) -} - -// CommitteeMultiAddress returns multiaddress of committee public keys by -// invoking netmap contract. -func CommitteeMultiAddress(sc interop.Hash160) []byte { - return contract.Call(sc, committeeMethod, contract.ReadOnly).([]byte) -} - // InnerRingNodes return list of inner ring nodes from state validator role // in side chain. func InnerRingNodes() []IRNode {