aboutsummaryrefslogtreecommitdiff
path: root/src/auditor/taler-auditor.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-03-12 11:33:10 +0100
committerChristian Grothoff <christian@grothoff.org>2018-03-12 11:33:10 +0100
commita166ca7fece8bbe3c66dcf0217cc81d20d185ab0 (patch)
treeb9cf10b1034e3f1d4d9c367ef2faa7e6bd206404 /src/auditor/taler-auditor.c
parent1ae2ba3d0a035734e4a28432e3246e58338fe9e8 (diff)
fix #5281 for exchange: do preflight check that an old transaction is no longer running by accident
Diffstat (limited to 'src/auditor/taler-auditor.c')
-rw-r--r--src/auditor/taler-auditor.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/auditor/taler-auditor.c b/src/auditor/taler-auditor.c
index e807378fe..b8f6c624c 100644
--- a/src/auditor/taler-auditor.c
+++ b/src/auditor/taler-auditor.c
@@ -1890,7 +1890,7 @@ check_transaction_history (const struct TALER_CoinSpendPublicKeyP *coin_pub,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Detected applicable deposit of %s\n",
TALER_amount2s (&amount_without_fee));
- deposit_fee = fee;
+ deposit_fee = fee;
}
/* Check that the fees given in the transaction list and in dki match */
TALER_amount_ntoh (&tmp,
@@ -2006,7 +2006,7 @@ check_transaction_history (const struct TALER_CoinSpendPublicKeyP *coin_pub,
merchant_gain,
deposit_fee));
}
-
+
/* Calculate total balance change, i.e. expenditures minus refunds */
if (GNUNET_SYSERR ==
TALER_amount_subtract (&spent,
@@ -3906,8 +3906,11 @@ transact (Analysis analysis,
GNUNET_break (0);
return GNUNET_SYSERR;
}
+ edb->preflight (edb->cls,
+ esession);
ret = edb->start (edb->cls,
- esession);
+ esession,
+ "auditor");
if (GNUNET_OK != ret)
{
GNUNET_break (0);
@@ -3918,7 +3921,7 @@ transact (Analysis analysis,
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT == qs)
{
qs = edb->commit (edb->cls,
- esession);
+ esession);
if (0 > qs)
{
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);