gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated: resolve another FIXME


From: gnunet
Subject: [taler-exchange] branch master updated: resolve another FIXME
Date: Fri, 17 Jan 2020 17:52:22 +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 67bfd940 resolve another FIXME
67bfd940 is described below

commit 67bfd94009edfeaa6f0afcc9afc9208cf35f3672
Author: Christian Grothoff <address@hidden>
AuthorDate: Fri Jan 17 17:52:20 2020 +0100

    resolve another FIXME
---
 src/include/taler_testing_lib.h        | 34 ++++-----------------------------
 src/lib/testing_api_cmd_refresh.c      | 35 ++++++++++++++++++++++++++++------
 src/lib/testing_api_trait_fresh_coin.c |  2 +-
 3 files changed, 34 insertions(+), 37 deletions(-)

diff --git a/src/include/taler_testing_lib.h b/src/include/taler_testing_lib.h
index dc99b820..2a08ba1e 100644
--- a/src/include/taler_testing_lib.h
+++ b/src/include/taler_testing_lib.h
@@ -2103,36 +2103,10 @@ TALER_TESTING_get_trait_uint (const struct 
TALER_TESTING_Command *cmd,
 
 
 /**
- * Information about a fresh coin generated by the refresh
- * operation. FIXME: should go away from here!
+ * Opaque handle to fresh coins generated during refresh.
+ * Details are internal to the refresh logic.
  */
-struct TALER_TESTING_FreshCoinData
-{
-
-  /**
-   * If @e amount is NULL, this specifies the denomination key to
-   * use.  Otherwise, this will be set (by the interpreter) to the
-   * denomination PK matching @e amount.
-   */
-  const struct TALER_EXCHANGE_DenomPublicKey *pk;
-
-  /**
-   * Set (by the interpreter) to the exchange's signature over the
-   * coin's public key.
-   */
-  struct TALER_DenominationSignature sig;
-
-  /**
-   * Set (by the interpreter) to the coin's private key.
-   */
-  struct TALER_CoinSpendPrivateKeyP coin_priv;
-
-  /**
-   * The blinding key (needed for payback operations).
-   */
-  struct TALER_DenominationBlindingKeyP blinding_key;
-
-};
+struct TALER_TESTING_FreshCoinData;
 
 
 /**
@@ -2147,7 +2121,7 @@ struct TALER_TESTING_FreshCoinData
  */
 struct TALER_TESTING_Trait
 TALER_TESTING_make_trait_fresh_coins (unsigned int index,
-                                      struct TALER_TESTING_FreshCoinData *
+                                      const struct TALER_TESTING_FreshCoinData 
*
                                       fresh_coins);
 
 
diff --git a/src/lib/testing_api_cmd_refresh.c 
b/src/lib/testing_api_cmd_refresh.c
index bf0f4ea1..2e921cef 100644
--- a/src/lib/testing_api_cmd_refresh.c
+++ b/src/lib/testing_api_cmd_refresh.c
@@ -16,13 +16,11 @@
   License along with TALER; see the file COPYING.  If not, see
   <http://www.gnu.org/licenses/>
 */
-
 /**
  * @file exchange-lib/testing_api_cmd_refresh.c
  * @brief commands for testing all "refresh" features.
  * @author Marcello Stanisci
  */
-
 #include "platform.h"
 #include "taler_json_lib.h"
 #include <gnunet/gnunet_curl_lib.h>
@@ -31,12 +29,37 @@
 #include "taler_signatures.h"
 #include "backoff.h"
 
+
 /**
- * Data for a coin to be melted.
+ * Information about a fresh coin generated by the refresh
+ * operation.
  */
-struct MeltDetails
+struct TALER_TESTING_FreshCoinData
 {
 
+  /**
+   * If @e amount is NULL, this specifies the denomination key to
+   * use.  Otherwise, this will be set (by the interpreter) to the
+   * denomination PK matching @e amount.
+   */
+  const struct TALER_EXCHANGE_DenomPublicKey *pk;
+
+  /**
+   * Set (by the interpreter) to the exchange's signature over the
+   * coin's public key.
+   */
+  struct TALER_DenominationSignature sig;
+
+  /**
+   * Set (by the interpreter) to the coin's private key.
+   */
+  struct TALER_CoinSpendPrivateKeyP coin_priv;
+
+  /**
+   * The blinding key (needed for payback operations).
+   */
+  struct TALER_DenominationBlindingKeyP blinding_key;
+
 };
 
 
@@ -344,8 +367,8 @@ reveal_cb (void *cls,
   switch (http_status)
   {
   case MHD_HTTP_OK:
-    rrs->fresh_coins = GNUNET_new_array
-                         (num_coins, struct TALER_TESTING_FreshCoinData);
+    rrs->fresh_coins = GNUNET_new_array (num_coins,
+                                         struct TALER_TESTING_FreshCoinData);
     for (unsigned int i = 0; i<num_coins; i++)
     {
       struct TALER_TESTING_FreshCoinData *fc = &rrs->fresh_coins[i];
diff --git a/src/lib/testing_api_trait_fresh_coin.c 
b/src/lib/testing_api_trait_fresh_coin.c
index 3c0ee1df..e580d994 100644
--- a/src/lib/testing_api_trait_fresh_coin.c
+++ b/src/lib/testing_api_trait_fresh_coin.c
@@ -66,7 +66,7 @@ TALER_TESTING_get_trait_fresh_coins
 struct TALER_TESTING_Trait
 TALER_TESTING_make_trait_fresh_coins
   (unsigned int index,
-  struct TALER_TESTING_FreshCoinData *fresh_coins)
+  const struct TALER_TESTING_FreshCoinData *fresh_coins)
 {
   struct TALER_TESTING_Trait ret = {
     .index = index,

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



reply via email to

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