aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_reserve_status.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-05-23 14:57:00 +0200
committerChristian Grothoff <christian@grothoff.org>2022-05-23 14:57:00 +0200
commitcdd2930a9951a552d221b8a8b8e9c0df35ad8be2 (patch)
tree2389f0cad26e47d2315650f2f9e698120c5f2182 /src/testing/testing_api_cmd_reserve_status.c
parent2035294adbcafc93c70d2cb7d27ce1a74d5a61ca (diff)
downloadexchange-cdd2930a9951a552d221b8a8b8e9c0df35ad8be2.tar.xz
-misc fixes to reserve history
Diffstat (limited to 'src/testing/testing_api_cmd_reserve_status.c')
-rw-r--r--src/testing/testing_api_cmd_reserve_status.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/testing/testing_api_cmd_reserve_status.c b/src/testing/testing_api_cmd_reserve_status.c
index 63f50772f..1d104cc3e 100644
--- a/src/testing/testing_api_cmd_reserve_status.c
+++ b/src/testing/testing_api_cmd_reserve_status.c
@@ -87,7 +87,7 @@ analyze_command (const struct TALER_ReservePublicKeyP *reserve_pub,
const struct TALER_TESTING_Command *cmd,
unsigned int history_length,
const struct TALER_EXCHANGE_ReserveHistoryEntry *history,
- int *found)
+ bool *found)
{
if (TALER_TESTING_cmd_is_batch (cmd))
{
@@ -114,7 +114,12 @@ analyze_command (const struct TALER_ReservePublicKeyP *reserve_pub,
history_length,
history,
found))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Entry for batch step `%s' missing in history\n",
+ step->label);
return GNUNET_SYSERR;
+ }
}
return GNUNET_OK;
}
@@ -186,7 +191,7 @@ reserve_status_cb (void *cls,
__LINE__);
json_dumpf (rs->hr.reply,
stderr,
- 0);
+ JSON_INDENT (2));
TALER_TESTING_interpreter_fail (ss->is);
return;
}
@@ -209,7 +214,7 @@ reserve_status_cb (void *cls,
return;
}
{
- int found[rs->details.ok.history_len];
+ bool found[rs->details.ok.history_len];
memset (found,
0,
@@ -228,6 +233,9 @@ reserve_status_cb (void *cls,
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Entry for command `%s' missing in history\n",
cmd->label);
+ json_dumpf (rs->hr.reply,
+ stderr,
+ JSON_INDENT (2));
TALER_TESTING_interpreter_fail (ss->is);
return;
}
@@ -239,6 +247,9 @@ reserve_status_cb (void *cls,
"History entry at index %u of type %d not justified by command status\n",
i,
rs->details.ok.history[i].type);
+ json_dumpf (rs->hr.reply,
+ stderr,
+ JSON_INDENT (2));
TALER_TESTING_interpreter_fail (ss->is);
return;
}