OSDN Git Service

check
authorHAOYUatHZ <haoyu@protonmail.com>
Sat, 15 Jun 2019 22:38:22 +0000 (06:38 +0800)
committerHAOYUatHZ <haoyu@protonmail.com>
Sat, 15 Jun 2019 22:38:22 +0000 (06:38 +0800)
federation/warder.go

index 04c8c7c..6e2d035 100644 (file)
@@ -102,5 +102,9 @@ func (w *warder) buildMainchainTx(tx *orm.CrossTransaction) error {
 }
 
 func (w *warder) signDestTx(tx *orm.CrossTransaction) error {
+       if tx.Status != common.CrossTxPendingStatus || !tx.DestTxHash.Valid {
+               return errors.New("cross-chain tx status error")
+       }
+
        return nil
 }