From f42c5e64fc08db32dff840bf14a3eca925374354 Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Tue, 23 Mar 2021 12:44:48 +0300 Subject: [PATCH] [#421] morph/client: Add neofs list update function Signed-off-by: Alex Vanin --- pkg/morph/client/notary.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pkg/morph/client/notary.go b/pkg/morph/client/notary.go index 04c1f4635..5e2666200 100644 --- a/pkg/morph/client/notary.go +++ b/pkg/morph/client/notary.go @@ -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 // blockchain. Fallback tx is a `RET`. Notary support should be enabled // in client to use this function.