summaryrefslogtreecommitdiff
path: root/src/lib/testing_api_cmd_check_keys.c
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2019-01-21 15:46:33 +0100
committerMarcello Stanisci <stanisci.m@gmail.com>2019-01-21 15:48:06 +0100
commit544a8edc8cfd50fa716467302ba8996f18be808f (patch)
treee3686448aa78c668d4eb89ce06c34e2970537738 /src/lib/testing_api_cmd_check_keys.c
parent038d32c768109bd64d3cb6ab45178d09a434cb17 (diff)
downloadexchange-544a8edc8cfd50fa716467302ba8996f18be808f.tar.gz
exchange-544a8edc8cfd50fa716467302ba8996f18be808f.tar.bz2
exchange-544a8edc8cfd50fa716467302ba8996f18be808f.zip
Debug + comment block.
Diffstat (limited to 'src/lib/testing_api_cmd_check_keys.c')
-rw-r--r--src/lib/testing_api_cmd_check_keys.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/lib/testing_api_cmd_check_keys.c b/src/lib/testing_api_cmd_check_keys.c
index 976639ae0..45aaeb55d 100644
--- a/src/lib/testing_api_cmd_check_keys.c
+++ b/src/lib/testing_api_cmd_check_keys.c
@@ -86,8 +86,9 @@ check_keys_run (void *cls,
struct CheckKeysState *cks = cls;
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "cmd `%s', key generation: %d\n",
+ "cmd `%s' (ip: %u), key generation: %d\n",
cmd->label,
+ is->ip,
is->key_generation);
if (is->key_generation < cks->generation)
@@ -112,6 +113,13 @@ check_keys_run (void *cls,
cks->pull_all_keys).abs_value_us);
return;
}
+
+ /**
+ * Not sure this check makes sense: GET /keys is performed on
+ * a "maybe" basis, so it can get quite hard to track /keys
+ * request. Rather, this CMD should just check if /keys was
+ * requested AT LEAST n times before going ahead with checks.
+ */
if (is->key_generation > cks->generation)
{
/* We got /keys too often, strange. Fatal. May theoretically
@@ -119,6 +127,10 @@ check_keys_run (void *cls,
"naturally", but obviously with a sane configuration this
should also not be. */
GNUNET_break (0);
+ TALER_LOG_ERROR ("Acutal- vs expected key"
+ " generation: %u vs %u\n",
+ is->key_generation,
+ cks->generation);
TALER_TESTING_interpreter_fail (is);
return;
}