[#58] common: Remove unused functions

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2021-03-24 11:18:16 +03:00 committed by Alex Vanin
parent 7cb7b0905b
commit c3a7c6ad23

View file

@ -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 {