diff --git a/pkg/morph/client/notary.go b/pkg/morph/client/notary.go index 069c35782..7399c19cd 100644 --- a/pkg/morph/client/notary.go +++ b/pkg/morph/client/notary.go @@ -412,16 +412,11 @@ func (c *Client) NotarySignAndInvokeTX(mainTx *transaction.Transaction) error { return err } - // error appears only if client - // is in inactive mode; that has - // been already checked above - magicNumber, _ := c.MagicNumber() - // mainTX is expected to be pre-validated: second witness must exist and be empty mainTx.Scripts[1].VerificationScript = multiaddrAccount.GetVerificationScript() mainTx.Scripts[1].InvocationScript = append( []byte{byte(opcode.PUSHDATA1), 64}, - multiaddrAccount.PrivateKey().SignHashable(uint32(magicNumber), mainTx)..., + multiaddrAccount.SignHashable(c.rpcActor.GetNetwork(), mainTx)..., ) //lint:ignore SA1019 https://git.frostfs.info/TrueCloudLab/frostfs-node/issues/202 @@ -667,12 +662,12 @@ func (c *Client) notaryWitnesses(invokedByAlpha bool, multiaddr *wallet.Account, // to pass Notary module verification var invokeScript []byte - magicNumber, _ := c.MagicNumber() + magicNumber := c.rpcActor.GetNetwork() if invokedByAlpha { invokeScript = append( []byte{byte(opcode.PUSHDATA1), 64}, - multiaddr.PrivateKey().SignHashable(uint32(magicNumber), tx)..., + multiaddr.SignHashable(magicNumber, tx)..., ) } else { // we can't provide alphabet node signature @@ -694,7 +689,7 @@ func (c *Client) notaryWitnesses(invokedByAlpha bool, multiaddr *wallet.Account, // then we have invoker witness invokeScript = append( []byte{byte(opcode.PUSHDATA1), 64}, - c.acc.PrivateKey().SignHashable(uint32(magicNumber), tx)..., + c.acc.SignHashable(magicNumber, tx)..., ) w = append(w, transaction.Witness{