From 57200e18cd0b264d5a86977556ed62acbd0f60c3 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Thu, 12 May 2022 18:38:57 +0300 Subject: [PATCH] [#1375] neofs-adm: Do not update NNS group if the key is the same If the group key is already set, do not send any transactions. Signed-off-by: Evgenii Stratonikov --- CHANGELOG.md | 1 + cmd/neofs-adm/internal/modules/morph/initialize_nns.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3286b479..e6e9e89d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ Changelog for NeoFS Node ### Fixed - Do not ask for contract wallet password twice (#1346) +- Do not update NNS group if the key is the same (#1375) ## [0.28.1] - 2022-05-05 diff --git a/cmd/neofs-adm/internal/modules/morph/initialize_nns.go b/cmd/neofs-adm/internal/modules/morph/initialize_nns.go index 7e109b23..f74ecb1f 100644 --- a/cmd/neofs-adm/internal/modules/morph/initialize_nns.go +++ b/cmd/neofs-adm/internal/modules/morph/initialize_nns.go @@ -83,7 +83,7 @@ func (c *initializeContext) setNNS() error { func (c *initializeContext) updateNNSGroup(nnsHash util.Uint160, pub *keys.PublicKey) error { bw := io.NewBufBinWriter() sysFee, err := c.emitUpdateNNSGroupScript(bw, nnsHash, pub) - if err != nil { + if err != nil || sysFee == 0 { return err } return c.sendCommitteeTx(bw.Bytes(), sysFee, true)