clean up debug logic

This commit is contained in:
Christian Grothoff 2017-05-11 11:43:50 +02:00
parent 43126e867a
commit f6f4b07bab
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC

View File

@ -318,15 +318,13 @@ verify_signatures (const struct TALER_EXCHANGE_DenomPublicKey *dki,
&coin_sig->eddsa_signature, &coin_sig->eddsa_signature,
&coin_pub->eddsa_pub)) &coin_pub->eddsa_pub))
{ {
GNUNET_break (0);
TALER_LOG_WARNING ("Invalid coin signature on /deposit request\n"); TALER_LOG_WARNING ("Invalid coin signature on /deposit request\n");
{ {
char *s; TALER_LOG_DEBUG ("... amount_with_fee was %s\n",
s = TALER_amount_to_string (amount); TALER_amount2s (amount));
TALER_LOG_DEBUG ("... amount_with_fee was %s\n", s); TALER_LOG_DEBUG ("... deposit_fee was %s\n",
GNUNET_free (s); TALER_amount2s (&dki->fee_deposit));
s = TALER_amount_to_string (&dki->fee_deposit);
TALER_LOG_DEBUG ("... deposit_fee was %s\n", s);
GNUNET_free (s);
} }
return GNUNET_SYSERR; return GNUNET_SYSERR;
@ -339,12 +337,14 @@ verify_signatures (const struct TALER_EXCHANGE_DenomPublicKey *dki,
if (GNUNET_YES != if (GNUNET_YES !=
TALER_test_coin_valid (&coin_info)) TALER_test_coin_valid (&coin_info))
{ {
GNUNET_break (0);
TALER_LOG_WARNING ("Invalid coin passed for /deposit\n"); TALER_LOG_WARNING ("Invalid coin passed for /deposit\n");
return GNUNET_SYSERR; return GNUNET_SYSERR;
} }
if (0 < TALER_amount_cmp (&dki->fee_deposit, if (0 < TALER_amount_cmp (&dki->fee_deposit,
amount)) amount))
{ {
GNUNET_break (0);
TALER_LOG_WARNING ("Deposit amount smaller than fee\n"); TALER_LOG_WARNING ("Deposit amount smaller than fee\n");
return GNUNET_SYSERR; return GNUNET_SYSERR;
} }