[#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 <evgeniy@nspcc.ru>
experimental
Evgenii Stratonikov 2022-05-12 18:38:57 +03:00 committed by LeL
parent 3a188bb2e5
commit 57200e18cd
2 changed files with 2 additions and 1 deletions

View File

@ -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

View File

@ -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)