gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-merchant] 01/02: actually, the rollback() was redund


From: gnunet
Subject: [GNUnet-SVN] [taler-merchant] 01/02: actually, the rollback() was redundant, instead introduce preflight checks
Date: Sat, 06 Apr 2019 15:50:52 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository merchant.

commit 595e0a05713710c537061c0e94069f346416391c
Author: Christian Grothoff <address@hidden>
AuthorDate: Sat Apr 6 15:49:13 2019 +0200

    actually, the rollback() was redundant, instead introduce preflight checks
---
 src/backend/taler-merchant-httpd_pay.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/backend/taler-merchant-httpd_pay.c 
b/src/backend/taler-merchant-httpd_pay.c
index 836e4bf..ec52ff2 100644
--- a/src/backend/taler-merchant-httpd_pay.c
+++ b/src/backend/taler-merchant-httpd_pay.c
@@ -451,7 +451,6 @@ abort_deposit (struct PayContext *pc)
       dci->dh = NULL;
     }
   }
-  db->rollback (db->cls);
 }
 
 
@@ -967,6 +966,7 @@ deposit_cb (void *cls,
               TALER_B2S (&pc->mi->pubkey));
   /* NOTE: not run in any transaction block, simply as a
      transaction by itself! */
+  db->preflight (db->cls);
   qs = db->store_deposit (db->cls,
                           &pc->h_contract_terms,
                           &pc->mi->pubkey,
@@ -1103,6 +1103,7 @@ process_pay_with_exchange (void *cls,
                 "Timing for this payment, wire_deadline: %llu, 
refund_deadline: %llu\n",
                 (unsigned long long) pc->wire_transfer_deadline.abs_value_us,
                 (unsigned long long) pc->refund_deadline.abs_value_us);
+    db->preflight (db->cls);
     dc->dh = TALER_EXCHANGE_deposit (mh,
                                      &dc->amount_with_fee,
                                      pc->wire_transfer_deadline,
@@ -1151,6 +1152,7 @@ find_next_exchange (struct PayContext *pc)
 
     if (GNUNET_YES != dc->found_in_db)
     {
+      db->preflight (db->cls);
       pc->current_exchange = dc->exchange_url;
       pc->fo = TMH_EXCHANGES_find_exchange (pc->current_exchange,
                                             pc->wm->wire_method,
@@ -1169,6 +1171,7 @@ find_next_exchange (struct PayContext *pc)
     }
   }
   pc->current_exchange = NULL;
+  db->preflight (db->cls);
   /* We are done with all the HTTP requests, go back and try
      the 'big' database transaction! (It should work now!) */
   begin_transaction (pc);

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]