[#722] neofs-adm: Check returned tx hash
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
37f9d083fb
commit
c55950bd70
1 changed files with 5 additions and 0 deletions
|
@ -3,6 +3,7 @@ package morph
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/nspcc-dev/neo-go/pkg/config/netmode"
|
"github.com/nspcc-dev/neo-go/pkg/config/netmode"
|
||||||
|
@ -84,6 +85,10 @@ func (c *clientContext) sendTx(tx *transaction.Transaction, cmd *cobra.Command,
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if h != tx.Hash() {
|
||||||
|
return fmt.Errorf("sent and actual tx hashes mismatch:\n\tsent: %v\n\tactual: %v", tx.Hash().StringLE(), h.StringLE())
|
||||||
|
}
|
||||||
|
|
||||||
c.Hashes = append(c.Hashes, h)
|
c.Hashes = append(c.Hashes, h)
|
||||||
|
|
||||||
if await {
|
if await {
|
||||||
|
|
Loading…
Reference in a new issue