OSDN Git Service

add
authorHAOYUatHZ <haoyu@protonmail.com>
Tue, 18 Jun 2019 10:35:01 +0000 (18:35 +0800)
committerHAOYUatHZ <haoyu@protonmail.com>
Tue, 18 Jun 2019 10:35:01 +0000 (18:35 +0800)
federation/warder.go

index a9e2d2c..2b5365c 100644 (file)
@@ -241,6 +241,10 @@ func (w *warder) addInputWitness(tx interface{}) {
 }
 
 func (w *warder) initDestTxSigns(destTx interface{}, ormTx *orm.CrossTransaction) error {
+       if err := w.db.Where(&orm.CrossTransactionSign{CrossTransactionID: ormTx.ID}).Error; err == nil {
+               return nil
+       }
+
        crossTxSigns := []*orm.CrossTransactionSign{}
        for i := 1; i <= len(w.remotes)+1; i++ {
                crossTxSigns = append(crossTxSigns, &orm.CrossTransactionSign{