[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-merchant] branch master updated (651298e -> 131c86c)
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-merchant] branch master updated (651298e -> 131c86c) |
Date: |
Sat, 06 Apr 2019 15:50:51 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a change to branch master
in repository merchant.
from 651298e add missing abort() to error handling in /pay transaction,
start to use GNUNET_memcmp()
new 595e0a0 actually, the rollback() was redundant, instead introduce
preflight checks
new 131c86c fix ftbfs
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
src/backend/taler-merchant-httpd_pay.c | 5 +++-
src/backenddb/test_merchantdb.c | 54 +++++++++++++++++-----------------
2 files changed, 31 insertions(+), 28 deletions(-)
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);
diff --git a/src/backenddb/test_merchantdb.c b/src/backenddb/test_merchantdb.c
index fbea98c..2893342 100644
--- a/src/backenddb/test_merchantdb.c
+++ b/src/backenddb/test_merchantdb.c
@@ -1002,41 +1002,41 @@ run (void *cls)
&refund_cb,
NULL));
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
- plugin->increase_refund_for_contract (plugin->cls,
- &h_contract_terms,
- &merchant_pub,
- &refund_amount,
- "refund testing"));
+ plugin->increase_refund_for_contract_NT (plugin->cls,
+ &h_contract_terms,
+ &merchant_pub,
+ &refund_amount,
+ "refund testing"));
FAILIF (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS !=
- plugin->increase_refund_for_contract (plugin->cls,
- &h_contract_terms,
- &merchant_pub,
- &refund_amount,
- "same refund amount as "
- "the previous one, should
succeed without changes (0)"));
+ plugin->increase_refund_for_contract_NT (plugin->cls,
+ &h_contract_terms,
+ &merchant_pub,
+ &refund_amount,
+ "same refund amount as "
+ "the previous one, should
succeed without changes (0)"));
/*Should fail as this refund a lesser amount respect to the previous one*/
FAILIF (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS !=
- plugin->increase_refund_for_contract (plugin->cls,
- &h_contract_terms,
- &merchant_pub,
- &little_refund_amount,
- "lower refund amount as the
previous one, should succeed without changes (0)"));
+ plugin->increase_refund_for_contract_NT (plugin->cls,
+ &h_contract_terms,
+ &merchant_pub,
+ &little_refund_amount,
+ "lower refund amount as the
previous one, should succeed without changes (0)"));
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
- plugin->increase_refund_for_contract (plugin->cls,
- &h_contract_terms,
- &merchant_pub,
- &right_second_refund_amount,
- "right refund increase"));
+ plugin->increase_refund_for_contract_NT (plugin->cls,
+ &h_contract_terms,
+ &merchant_pub,
+ &right_second_refund_amount,
+ "right refund increase"));
FAILIF (GNUNET_DB_STATUS_HARD_ERROR !=
- plugin->increase_refund_for_contract (plugin->cls,
- &h_contract_terms,
- &merchant_pub,
- &too_big_refund_amount,
- "make refund testing fail due"
- " to too big refund amount"));
+ plugin->increase_refund_for_contract_NT (plugin->cls,
+ &h_contract_terms,
+ &merchant_pub,
+ &too_big_refund_amount,
+ "make refund testing fail
due"
+ " to too big refund
amount"));
FAILIF (GNUNET_OK !=
test_wire_fee ());
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [taler-merchant] branch master updated (651298e -> 131c86c),
gnunet <=