aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_coin_history.c
diff options
context:
space:
mode:
authorChristian Grothoff <grothoff@gnunet.org>2023-11-10 10:53:11 +0100
committerChristian Grothoff <grothoff@gnunet.org>2023-11-10 10:53:11 +0100
commit67f06263a370a92002540c9fd56c5c0ca646d34a (patch)
treed908065c63d39950f5756718a743c2ef29d44ef8 /src/testing/testing_api_cmd_coin_history.c
parentdc9803173f998fb63077f38e7db723a01eb71028 (diff)
downloadexchange-67f06263a370a92002540c9fd56c5c0ca646d34a.tar.xz
implement coin history for purse-with-deposit
Diffstat (limited to 'src/testing/testing_api_cmd_coin_history.c')
-rw-r--r--src/testing/testing_api_cmd_coin_history.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/testing/testing_api_cmd_coin_history.c b/src/testing/testing_api_cmd_coin_history.c
index 811e43702..a1345f67f 100644
--- a/src/testing/testing_api_cmd_coin_history.c
+++ b/src/testing/testing_api_cmd_coin_history.c
@@ -120,7 +120,12 @@ history_entry_cmp (
return 1;
if (0 != TALER_amount_cmp (&h1->amount,
&h2->amount))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Amount mismatch (%s)\n",
+ TALER_amount2s (&h1->amount));
return 1;
+ }
switch (h1->type)
{
case TALER_EXCHANGE_CTT_NONE:
@@ -178,10 +183,21 @@ history_entry_cmp (
/* coin_sig is not initialized */
if (0 != GNUNET_memcmp (&h1->details.purse_deposit.purse_pub,
&h2->details.purse_deposit.purse_pub))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Purse public key mismatch\n");
return 1;
+ }
if (0 != strcmp (h1->details.purse_deposit.exchange_base_url,
h2->details.purse_deposit.exchange_base_url))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Exchange base URL mismatch (%s/%s)\n",
+ h1->details.purse_deposit.exchange_base_url,
+ h2->details.purse_deposit.exchange_base_url);
+ GNUNET_break (0);
return 1;
+ }
return 0;
case TALER_EXCHANGE_CTT_PURSE_REFUND:
/* NOTE: not supported yet (trait not returned) */
@@ -259,12 +275,18 @@ analyze_command (void *cls,
TALER_TESTING_get_trait_coin_pub (cmd,
j,
&rp))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Command `%s#%u' has no public key for a coin\n",
+ cmd->label,
+ j);
break; /* command does nothing for coins */
+ }
if (0 !=
GNUNET_memcmp (rp,
coin_pub))
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Command `%s#%u' is about another coin\n",
cmd->label,
j);