From b4582239bf116cc1b2cd03ef4afb32eabf58e9b0 Mon Sep 17 00:00:00 2001 From: Anton Nikiforov Date: Fri, 10 Mar 2023 10:44:56 +0300 Subject: [PATCH] [#130] adm: Fix adding of pub key for `group.frostfs` at init step Signed-off-by: Anton Nikiforov --- CHANGELOG.md | 1 + cmd/frostfs-adm/internal/modules/morph/initialize_nns.go | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f2875ea4f3..7e9ba6d060 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,6 +48,7 @@ Changelog for FrostFS Node - Create contract wallet only by `init` and `update-config` command (#63) - Actually use `object.put.pool_size_local` and independent pool for local puts (#64). - Pretty printer of basic ACL in the NeoFS CLI (#2259) +- Adding of public key for nns group `group.frostfs` at init step (#130) ### Removed ### Updated diff --git a/cmd/frostfs-adm/internal/modules/morph/initialize_nns.go b/cmd/frostfs-adm/internal/modules/morph/initialize_nns.go index 91727202b2..b43c2da338 100644 --- a/cmd/frostfs-adm/internal/modules/morph/initialize_nns.go +++ b/cmd/frostfs-adm/internal/modules/morph/initialize_nns.go @@ -82,13 +82,13 @@ func (c *initializeContext) setNNS() error { func (c *initializeContext) updateNNSGroup(nnsHash util.Uint160, pub *keys.PublicKey) error { bw := io.NewBufBinWriter() - needUpdate, needRegister, err := c.emitUpdateNNSGroupScript(bw, nnsHash, pub) - if !needUpdate || err != nil { + keyAlreadyAdded, domainRegCodeEmitted, err := c.emitUpdateNNSGroupScript(bw, nnsHash, pub) + if keyAlreadyAdded || err != nil { return err } script := bw.Bytes() - if needRegister { + if domainRegCodeEmitted { w := io.NewBufBinWriter() emit.Instruction(w.BinWriter, opcode.INITSSLOT, []byte{1}) wrapRegisterScriptWithPrice(w, nnsHash, script)