summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-03-10 17:11:12 +0100
committerChristian Grothoff <christian@grothoff.org>2020-03-10 17:11:12 +0100
commitf32193aae212d7d61f60e7056c0e6bbfd487c442 (patch)
treee9290cc53859b5d06929e9162ae76c5f57005d75 /src
parent883c063f434cff70e427ae720fe8566b293a36f1 (diff)
downloadexchange-f32193aae212d7d61f60e7056c0e6bbfd487c442.tar.gz
exchange-f32193aae212d7d61f60e7056c0e6bbfd487c442.tar.bz2
exchange-f32193aae212d7d61f60e7056c0e6bbfd487c442.zip
minor code cleanup
Diffstat (limited to 'src')
-rw-r--r--src/lib/exchange_api_handle.c33
-rw-r--r--src/testing/test_exchange_api_keys_cherry_picking.c3
2 files changed, 9 insertions, 27 deletions
diff --git a/src/lib/exchange_api_handle.c b/src/lib/exchange_api_handle.c
index 42f4e816..3b2a84b2 100644
--- a/src/lib/exchange_api_handle.c
+++ b/src/lib/exchange_api_handle.c
@@ -1151,16 +1151,6 @@ request_keys (void *cls);
/**
- * Put the handle back to the init state. Might
- * be useful to force-download all /keys.
- *
- * @param h exchange handle.
- */
-void
-TEAH_handle_reset (struct TALER_EXCHANGE_Handle *h);
-
-
-/**
* Set the fake now to be used when requesting "/keys".
*
* @param exchange exchange handle.
@@ -1208,7 +1198,7 @@ TALER_EXCHANGE_set_last_denom (struct TALER_EXCHANGE_Handle *exchange,
*
* @param exchange exchange to check keys for
* @param force_download #GNUNET_YES to force download even if /keys is still valid
- * @param pull_all_keys if GNUNET_YES, then the exchange state is reset to 'init',
+ * @param pull_all_keys if #GNUNET_YES, then the exchange state is reset to #MHS_INIT,
* and all denoms will be redownloaded.
* @return until when the response is current, 0 if we are re-downloading
*/
@@ -1222,8 +1212,10 @@ TALER_EXCHANGE_check_keys_current (struct TALER_EXCHANGE_Handle *exchange,
if (GNUNET_YES == pull_all_keys)
{
- GNUNET_assert (GNUNET_YES == force_download);
- TEAH_handle_reset (exchange);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Forcing re-download of all keys\n");
+ GNUNET_break (GNUNET_YES == force_download);
+ exchange->state = MHS_INIT;
}
if ( (GNUNET_NO == force_download) &&
(0 < GNUNET_TIME_absolute_get_remaining (
@@ -1373,6 +1365,8 @@ keys_completed_cb (void *cls,
exchange->kr = NULL;
free_keys_request (kr);
exchange->state = MHS_FAILED;
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "/keys download failed\n");
if (NULL != exchange->key_data_raw)
{
json_decref (exchange->key_data_raw);
@@ -1416,19 +1410,6 @@ TEAH_handle_to_context (struct TALER_EXCHANGE_Handle *h)
/**
- * Put the handle back to the init state. Might
- * be useful to force-download all /keys.
- *
- * @param h exchange handle.
- */
-void
-TEAH_handle_reset (struct TALER_EXCHANGE_Handle *h)
-{
- h->state = MHS_INIT;
-}
-
-
-/**
* Check if the handle is ready to process requests.
*
* @param h the exchange handle to query
diff --git a/src/testing/test_exchange_api_keys_cherry_picking.c b/src/testing/test_exchange_api_keys_cherry_picking.c
index a104b805..a9f6e3d8 100644
--- a/src/testing/test_exchange_api_keys_cherry_picking.c
+++ b/src/testing/test_exchange_api_keys_cherry_picking.c
@@ -161,7 +161,8 @@ run (void *cls,
* key set. The new KS will have only one key, because the
* current lookahead_sign == 60 seconds and the key's withdraw
* duration is 80 seconds.
- */TALER_TESTING_cmd_exec_keyup_with_now
+ *///
+ TALER_TESTING_cmd_exec_keyup_with_now
("keyup-1",
CONFIG_FILE,
TTH_parse_time (JAN2030)),