gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-exchange] branch master updated: cover get more of /


From: gnunet
Subject: [GNUnet-SVN] [taler-exchange] branch master updated: cover get more of /wire API in test case
Date: Mon, 06 Mar 2017 17:05:56 +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 92345d0  cover get more of /wire API in test case
92345d0 is described below

commit 92345d05e2717eac5729dc6233bc34244d6f3b41
Author: Christian Grothoff <address@hidden>
AuthorDate: Mon Mar 6 17:07:31 2017 +0100

    cover get more of /wire API in test case
---
 src/exchange-lib/test_exchange_api.c | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/src/exchange-lib/test_exchange_api.c 
b/src/exchange-lib/test_exchange_api.c
index 3e69c25..056d293 100644
--- a/src/exchange-lib/test_exchange_api.c
+++ b/src/exchange-lib/test_exchange_api.c
@@ -1352,6 +1352,28 @@ find_pk (const struct TALER_EXCHANGE_Keys *keys,
 
 
 /**
+ * Function called with information about the wire fees
+ * for each wire method.
+ *
+ * @param cls closure
+ * @param wire_method name of the wire method (i.e. "sepa")
+ * @param fees fee structure for this method
+ */
+static void
+check_fee_cb (void *cls,
+              const char *wire_method,
+              const struct TALER_EXCHANGE_WireAggregateFees *fees)
+{
+  struct InterpreterState *is = cls;
+  struct Command *cmd = &is->commands[is->ip];
+
+  GNUNET_break (0 == strcasecmp (cmd->details.wire.format,
+                                 wire_method));
+  /* FIXME: actually check @a fees as well... */
+}
+
+
+/**
  * Callbacks called with the result(s) of a
  * wire format inquiry request to the exchange.
  *
@@ -1400,6 +1422,19 @@ wire_cb (void *cls,
         fail (is);
         return;
       }
+      if (GNUNET_OK !=
+          TALER_EXCHANGE_wire_get_fees (&TALER_EXCHANGE_get_keys 
(exchange)->master_pub,
+                                        obj,
+                                        &check_fee_cb,
+                                        is))
+      {
+        GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                    "Wire fee extraction in command %s failed\n",
+                    cmd->label);
+        json_dumpf (obj, stderr, 0);
+        fail (is);
+        return;
+      }
     }
     break;
   default:

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



reply via email to

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