summaryrefslogtreecommitdiff
path: root/src/auditor/taler-helper-auditor-coins.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-03-27 13:29:19 +0100
committerChristian Grothoff <christian@grothoff.org>2020-03-27 13:29:19 +0100
commit155a4bc11bab96316001325ff19af29eab9f6a71 (patch)
tree81669950aa95888895382c80c2c1ecf4e29ba925 /src/auditor/taler-helper-auditor-coins.c
parentb5f62c80602cc9431ac13b63a6836b876d82860b (diff)
downloadexchange-155a4bc11bab96316001325ff19af29eab9f6a71.tar.gz
exchange-155a4bc11bab96316001325ff19af29eab9f6a71.tar.bz2
exchange-155a4bc11bab96316001325ff19af29eab9f6a71.zip
fix checks
Diffstat (limited to 'src/auditor/taler-helper-auditor-coins.c')
-rw-r--r--src/auditor/taler-helper-auditor-coins.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/auditor/taler-helper-auditor-coins.c b/src/auditor/taler-helper-auditor-coins.c
index d51b99d6..50e801d3 100644
--- a/src/auditor/taler-helper-auditor-coins.c
+++ b/src/auditor/taler-helper-auditor-coins.c
@@ -486,6 +486,7 @@ check_coin_history (const struct TALER_CoinSpendPublicKeyP *coin_pub,
GNUNET_assert (GNUNET_OK ==
TALER_amount_get_zero (value->currency,
&deposit_fee));
+ have_refund = GNUNET_NO;
for (struct TALER_EXCHANGEDB_TransactionList *pos = tl;
NULL != pos;
pos = pos->next)
@@ -563,9 +564,10 @@ check_coin_history (const struct TALER_CoinSpendPublicKeyP *coin_pub,
/* spent > total: bad */
struct TALER_Amount loss;
- TALER_amount_subtract (&loss,
- &spent,
- &total);
+ GNUNET_assert (GNUNET_OK ==
+ TALER_amount_subtract (&loss,
+ &spent,
+ &total));
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Loss detected for coin %s - %s\n",
TALER_B2S (coin_pub),