From 61dff99774fe50a537638fcef805283ca32aa6ca Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Tue, 23 Mar 2021 13:03:23 +0300 Subject: [PATCH] [#421] morph/client: Add designate role getter wrapper for NeoFSAlphabet role Signed-off-by: Alex Vanin --- pkg/morph/client/client.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkg/morph/client/client.go b/pkg/morph/client/client.go index 29a374fdd..7e78e44dd 100644 --- a/pkg/morph/client/client.go +++ b/pkg/morph/client/client.go @@ -217,6 +217,18 @@ func (c *Client) Committee() (keys.PublicKeys, error) { return roleKeys, nil } +// NeoFSAlphabetList returns keys that stored in NeoFS Alphabet role. Main chain +// stores alphabet node keys of inner ring there, however side chain stores both +// alphabet and non alphabet node keys of inner ring. +func (c *Client) NeoFSAlphabetList() (keys.PublicKeys, error) { + list, err := c.roleList(native.RoleNeoFSAlphabet) + if err != nil { + return nil, errors.Wrap(err, "can't get alphabet nodes role list") + } + + return list, nil +} + func (c *Client) roleList(r native.Role) (keys.PublicKeys, error) { height, err := c.client.GetBlockCount() if err != nil {