func (w *Warder) RequestSign(destTx interface{}, ormTx *orm.CrossTransaction) (string, error) {
return "", nil
}
+
+// NotifySubmission() will notify a remote warder the submission of a destTx,
+// the remote warder will check the tx signs count and set the tx submitted if
+// signs count reach quorum
+func (w *Warder) NotifySubmission(ormTx *orm.CrossTransaction) error {
+ return nil
+}
}
if submittedTxID != destTxID {
- log.WithFields(log.Fields{"err": err, "cross-chain tx": ormTx, "built tx ID": destTxID, "submittedTx ID": submittedTxID}).Warnln("submitTx ID mismatch")
+ log.WithFields(log.Fields{"err": err, "cross-chain tx": ormTx, "builtTx ID": destTxID, "submittedTx ID": submittedTxID}).Warnln("submitTx ID mismatch")
continue
}
// TODO:
func (w *warder) updateSubmission(tx *orm.CrossTransaction) error {
+ if err := w.db.Where(tx).UpdateColumn(&orm.CrossTransaction{
+ Status: common.CrossTxSubmittedStatus,
+ }).Error; err != nil {
+ return err
+ }
+
+ for _, remote := range w.remotes {
+ remote.NotifySubmission(tx)
+ }
return nil
}