OSDN Git Service

init
authorHAOYUatHZ <haoyu@protonmail.com>
Tue, 18 Jun 2019 07:46:15 +0000 (15:46 +0800)
committerHAOYUatHZ <haoyu@protonmail.com>
Tue, 18 Jun 2019 07:46:15 +0000 (15:46 +0800)
federation/warder.go

index 863c1fd..869e440 100644 (file)
@@ -108,6 +108,11 @@ func (w *warder) processCrossTxRoutine() {
                        continue
                }
 
+               if err := w.initDestTxSigns(destTx, ormTx); err != nil {
+                       log.WithFields(log.Fields{"err": err, "cross-chain tx": ormTx}).Warnln("initDestTxSigns")
+                       continue
+               }
+
                if err := w.signDestTx(destTx, ormTx); err != nil {
                        log.WithFields(log.Fields{"err": err, "cross-chain tx": ormTx}).Warnln("signDestTx")
                        continue
@@ -232,6 +237,7 @@ func (w *warder) buildMainchainTx(tx *orm.CrossTransaction) (*btmTypes.Tx, strin
        return mainchainTx, mainchainTx.ID.String(), nil
 }
 
+// TODO:
 func (w *warder) addInputWitness(tx interface{}) {
        switch tx.(type) {
        case *vaporTypes.Tx:
@@ -241,6 +247,11 @@ func (w *warder) addInputWitness(tx interface{}) {
 }
 
 // TODO:
+func (w *warder) initDestTxSigns(destTx interface{}, tx *orm.CrossTransaction) error {
+       return nil
+}
+
+// TODO:
 func (w *warder) signDestTx(destTx interface{}, tx *orm.CrossTransaction) error {
        if tx.Status != common.CrossTxPendingStatus || !tx.DestTxHash.Valid {
                return errors.New("cross-chain tx status error")