diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-05-11 11:43:50 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-05-11 11:43:50 +0200 |
commit | f6f4b07bab75c67c10f85e21b621886db4ee954f (patch) | |
tree | 16ecbe2ad563c5bc0a8630de589ec714cfff319c /src/exchange-lib/exchange_api_deposit.c | |
parent | 43126e867a71b7ce0bb127e5ffe02ae952d2c602 (diff) |
clean up debug logic
Diffstat (limited to 'src/exchange-lib/exchange_api_deposit.c')
-rw-r--r-- | src/exchange-lib/exchange_api_deposit.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/exchange-lib/exchange_api_deposit.c b/src/exchange-lib/exchange_api_deposit.c index 72f588f46..7a3aff141 100644 --- 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; } |