frostfs-node/pkg/morph/client/netmap/wrapper/irlist.go
Stanislav Bogatyrev b7b5079934 Add Inner Ring code
2020-07-24 17:07:37 +03:00

21 lines
553 B
Go

package wrapper
import (
contract "github.com/nspcc-dev/neofs-node/pkg/morph/client/netmap"
"github.com/pkg/errors"
)
// InnerRingKeys receives public key list of inner
// ring nodes through Netmap contract call and returns it.
func (w *Wrapper) InnerRingKeys() ([][]byte, error) {
// prepare invocation arguments
args := contract.InnerRingListArgs{}
// invoke smart contract call
values, err := w.client.InnerRingList(args)
if err != nil {
return nil, errors.Wrap(err, "could not invoke smart contract")
}
return values.KeyList(), nil
}