gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-exchange] branch master updated: minor code cleanup


From: gnunet
Subject: [taler-exchange] branch master updated: minor code cleanup
Date: Tue, 10 Mar 2020 17:11:15 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new f32193aa minor code cleanup
f32193aa is described below

commit f32193aae212d7d61f60e7056c0e6bbfd487c442
Author: Christian Grothoff <address@hidden>
AuthorDate: Tue Mar 10 17:11:12 2020 +0100

    minor code cleanup
---
 src/lib/exchange_api_handle.c                      | 33 +++++-----------------
 .../test_exchange_api_keys_cherry_picking.c        |  3 +-
 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
@@ -1150,16 +1150,6 @@ static void
 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".
  *
@@ -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);
@@ -1415,19 +1409,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.
  *
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)),

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]