[#421] morph/client: Add neofs list update function

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2021-03-23 12:44:48 +03:00 committed by Alex Vanin
parent b3632dcd81
commit f42c5e64fc

View file

@ -167,6 +167,21 @@ func (c *Client) UpdateNotaryList(list keys.PublicKeys) error {
) )
} }
// UpdateNeoFSAlphabetList updates list of alphabet nodes in designate contract.
// As for side chain list should contain all inner ring nodes.
// Requires committee multi signature.
func (c *Client) UpdateNeoFSAlphabetList(list keys.PublicKeys) error {
if c.notary == nil {
return errNotaryNotEnabled
}
return c.notaryInvokeAsCommittee(c.designate,
setDesignateMethod,
native.RoleNeoFSAlphabet,
list,
)
}
// Invoke invokes contract method by sending tx to notary contract in // Invoke invokes contract method by sending tx to notary contract in
// blockchain. Fallback tx is a `RET`. Notary support should be enabled // blockchain. Fallback tx is a `RET`. Notary support should be enabled
// in client to use this function. // in client to use this function.