summaryrefslogtreecommitdiff
path: root/src/exchangedb/exchangedb_transactions.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-07-10 21:27:06 +0200
committerChristian Grothoff <christian@grothoff.org>2020-07-10 21:27:06 +0200
commit7cf67b309465d7274457cdd12547daa836464fd9 (patch)
treef48d32ab36b41dbbe5c50a1fac1f3570b5a529c3 /src/exchangedb/exchangedb_transactions.c
parentaf0a2c32a3592b3fe0a756ada1bf377c144a855b (diff)
downloadexchange-7cf67b309465d7274457cdd12547daa836464fd9.tar.gz
exchange-7cf67b309465d7274457cdd12547daa836464fd9.tar.bz2
exchange-7cf67b309465d7274457cdd12547daa836464fd9.zip
this invariant does not actually hold, i.e. if there is a /recoup request for a coin we never saw
Diffstat (limited to 'src/exchangedb/exchangedb_transactions.c')
-rw-r--r--src/exchangedb/exchangedb_transactions.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/exchangedb/exchangedb_transactions.c b/src/exchangedb/exchangedb_transactions.c
index 11ed3ac7..39d5bfbb 100644
--- a/src/exchangedb/exchangedb_transactions.c
+++ b/src/exchangedb/exchangedb_transactions.c
@@ -42,13 +42,11 @@ TALER_EXCHANGEDB_calculate_transaction_list_totals (
struct TALER_Amount refunded;
struct TALER_Amount deposit_fee;
bool have_refund;
- 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_or_recoup = false;
for (struct TALER_EXCHANGEDB_TransactionList *pos = tl;
NULL != pos;
pos = pos->next)
@@ -57,7 +55,6 @@ TALER_EXCHANGEDB_calculate_transaction_list_totals (
{
case TALER_EXCHANGEDB_TT_DEPOSIT:
/* spent += pos->amount_with_fee */
- have_deposit_or_melt_or_recoup = true;
if (0 >
TALER_amount_add (&spent,
&spent,
@@ -70,7 +67,6 @@ TALER_EXCHANGEDB_calculate_transaction_list_totals (
break;
case TALER_EXCHANGEDB_TT_MELT:
/* spent += pos->amount_with_fee */
- have_deposit_or_melt_or_recoup = true;
if (0 >
TALER_amount_add (&spent,
&spent,
@@ -112,7 +108,6 @@ 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,
@@ -157,7 +152,6 @@ TALER_EXCHANGEDB_calculate_transaction_list_totals (
GNUNET_break (0);
return GNUNET_SYSERR;
}
- GNUNET_break (have_deposit_or_melt_or_recoup);
*ret = spent;
return GNUNET_OK;
}