commit f6f4b07bab75c67c10f85e21b621886db4ee954f
parent 43126e867a71b7ce0bb127e5ffe02ae952d2c602
Author: Christian Grothoff <christian@grothoff.org>
Date: Thu, 11 May 2017 11:43:50 +0200
clean up debug logic
Diffstat:
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/exchange-lib/exchange_api_deposit.c b/src/exchange-lib/exchange_api_deposit.c
@@ -318,15 +318,13 @@ verify_signatures (const struct TALER_EXCHANGE_DenomPublicKey *dki,
&coin_sig->eddsa_signature,
&coin_pub->eddsa_pub))
{
+ GNUNET_break (0);
TALER_LOG_WARNING ("Invalid coin signature on /deposit request\n");
{
- char *s;
- s = TALER_amount_to_string (amount);
- TALER_LOG_DEBUG ("... amount_with_fee was %s\n", s);
- GNUNET_free (s);
- s = TALER_amount_to_string (&dki->fee_deposit);
- TALER_LOG_DEBUG ("... deposit_fee was %s\n", s);
- GNUNET_free (s);
+ TALER_LOG_DEBUG ("... amount_with_fee was %s\n",
+ TALER_amount2s (amount));
+ TALER_LOG_DEBUG ("... deposit_fee was %s\n",
+ TALER_amount2s (&dki->fee_deposit));
}
return GNUNET_SYSERR;
@@ -339,12 +337,14 @@ verify_signatures (const struct TALER_EXCHANGE_DenomPublicKey *dki,
if (GNUNET_YES !=
TALER_test_coin_valid (&coin_info))
{
+ GNUNET_break (0);
TALER_LOG_WARNING ("Invalid coin passed for /deposit\n");
return GNUNET_SYSERR;
}
if (0 < TALER_amount_cmp (&dki->fee_deposit,
amount))
{
+ GNUNET_break (0);
TALER_LOG_WARNING ("Deposit amount smaller than fee\n");
return GNUNET_SYSERR;
}