frostfs-node/pkg/morph/client/netmap/wrapper/irlist.go

22 lines
553 B
Go
Raw Normal View History

2020-07-24 13:54:03 +00:00
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
}