[#1294] neofs-adm: Use Global scope where needed

Provide explicit argument to `sendCommitteeTx` signifying whether a tx
should try to use group signer.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2022-04-05 17:21:11 +03:00 committed by fyrchik
parent 7d670129c9
commit 82fda42316
9 changed files with 22 additions and 19 deletions

View file

@ -278,7 +278,7 @@ func (c *initializeContext) updateContracts() error {
c.Command.Printf("NNS: Set %s -> %s\n", morphClient.NNSGroupKeyName, hex.EncodeToString(groupKey.Bytes()))
totalGasCost += sysFee
if err := c.sendCommitteeTx(w.Bytes(), totalGasCost); err != nil {
if err := c.sendCommitteeTx(w.Bytes(), totalGasCost, false); err != nil {
return err
}
return c.awaitTx()
@ -360,7 +360,7 @@ func (c *initializeContext) deployContracts() error {
return fmt.Errorf("can't deploy %s contract: %s", ctrName, res.FaultException)
}
if err := c.sendCommitteeTx(res.Script, res.GasConsumed); err != nil {
if err := c.sendCommitteeTx(res.Script, res.GasConsumed, false); err != nil {
return err
}
}