diff --git a/cmd/neofs-adm/internal/modules/morph/local_client.go b/cmd/neofs-adm/internal/modules/morph/local_client.go index 2778ee0c..fd75de49 100644 --- a/cmd/neofs-adm/internal/modules/morph/local_client.go +++ b/cmd/neofs-adm/internal/modules/morph/local_client.go @@ -372,6 +372,13 @@ func (l *localClient) InvokeScript(script []byte, signers []transaction.Signer) } func (l *localClient) SendRawTransaction(tx *transaction.Transaction) (util.Uint256, error) { + // We need to test that transaction was formed correctly to catch as many errors as we can. + bs := tx.Bytes() + _, err := transaction.NewTransactionFromBytes(bs) + if err != nil { + return tx.Hash(), fmt.Errorf("invalid transaction: %w", err) + } + l.transactions = append(l.transactions, tx) return tx.Hash(), nil }