aboutsummaryrefslogtreecommitdiff
path: root/src/exchangedb
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-07-09 23:27:16 +0200
committerChristian Grothoff <christian@grothoff.org>2020-07-09 23:27:16 +0200
commitaf0a2c32a3592b3fe0a756ada1bf377c144a855b (patch)
tree6e54b4971b1ad421f11a9de4b686068ebbf19499 /src/exchangedb
parentf708e4d64cd72775a640182d308a7549fb3006d9 (diff)
work on more testing for recoup-refresh
Diffstat (limited to 'src/exchangedb')
-rw-r--r--src/exchangedb/exchangedb_transactions.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/exchangedb/exchangedb_transactions.c b/src/exchangedb/exchangedb_transactions.c
index c1723958f..11ed3ac77 100644
--- a/src/exchangedb/exchangedb_transactions.c
+++ b/src/exchangedb/exchangedb_transactions.c
@@ -42,13 +42,13 @@ TALER_EXCHANGEDB_calculate_transaction_list_totals (
struct TALER_Amount refunded;
struct TALER_Amount deposit_fee;
bool have_refund;
- bool have_deposit_or_melt;
+ bool have_deposit_or_melt_or_recoup;
GNUNET_assert (GNUNET_OK ==
TALER_amount_get_zero (spent.currency,
&refunded));
have_refund = false;
- have_deposit_or_melt = false;
+ have_deposit_or_melt_or_recoup = false;
for (struct TALER_EXCHANGEDB_TransactionList *pos = tl;
NULL != pos;
pos = pos->next)
@@ -57,7 +57,7 @@ TALER_EXCHANGEDB_calculate_transaction_list_totals (
{
case TALER_EXCHANGEDB_TT_DEPOSIT:
/* spent += pos->amount_with_fee */
- have_deposit_or_melt = true;
+ have_deposit_or_melt_or_recoup = true;
if (0 >
TALER_amount_add (&spent,
&spent,
@@ -70,7 +70,7 @@ TALER_EXCHANGEDB_calculate_transaction_list_totals (
break;
case TALER_EXCHANGEDB_TT_MELT:
/* spent += pos->amount_with_fee */
- have_deposit_or_melt = true;
+ have_deposit_or_melt_or_recoup = true;
if (0 >
TALER_amount_add (&spent,
&spent,
@@ -112,6 +112,7 @@ TALER_EXCHANGEDB_calculate_transaction_list_totals (
}
break;
case TALER_EXCHANGEDB_TT_RECOUP:
+ have_deposit_or_melt_or_recoup = true;
/* spent += pos->value */
if (0 >
TALER_amount_add (&spent,
@@ -156,7 +157,7 @@ TALER_EXCHANGEDB_calculate_transaction_list_totals (
GNUNET_break (0);
return GNUNET_SYSERR;
}
- GNUNET_break (have_deposit_or_melt);
+ GNUNET_break (have_deposit_or_melt_or_recoup);
*ret = spent;
return GNUNET_OK;
}