fix checks
This commit is contained in:
parent
b5f62c8060
commit
155a4bc11b
@ -486,6 +486,7 @@ check_coin_history (const struct TALER_CoinSpendPublicKeyP *coin_pub,
|
|||||||
GNUNET_assert (GNUNET_OK ==
|
GNUNET_assert (GNUNET_OK ==
|
||||||
TALER_amount_get_zero (value->currency,
|
TALER_amount_get_zero (value->currency,
|
||||||
&deposit_fee));
|
&deposit_fee));
|
||||||
|
have_refund = GNUNET_NO;
|
||||||
for (struct TALER_EXCHANGEDB_TransactionList *pos = tl;
|
for (struct TALER_EXCHANGEDB_TransactionList *pos = tl;
|
||||||
NULL != pos;
|
NULL != pos;
|
||||||
pos = pos->next)
|
pos = pos->next)
|
||||||
@ -563,9 +564,10 @@ check_coin_history (const struct TALER_CoinSpendPublicKeyP *coin_pub,
|
|||||||
/* spent > total: bad */
|
/* spent > total: bad */
|
||||||
struct TALER_Amount loss;
|
struct TALER_Amount loss;
|
||||||
|
|
||||||
TALER_amount_subtract (&loss,
|
GNUNET_assert (GNUNET_OK ==
|
||||||
&spent,
|
TALER_amount_subtract (&loss,
|
||||||
&total);
|
&spent,
|
||||||
|
&total));
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
|
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
|
||||||
"Loss detected for coin %s - %s\n",
|
"Loss detected for coin %s - %s\n",
|
||||||
TALER_B2S (coin_pub),
|
TALER_B2S (coin_pub),
|
||||||
|
Loading…
Reference in New Issue
Block a user