gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis] branch master updated: API test fix


From: gnunet
Subject: [taler-anastasis] branch master updated: API test fix
Date: Fri, 20 Nov 2020 18:22:20 +0100

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

ds-meister pushed a commit to branch master
in repository anastasis.

The following commit(s) were added to refs/heads/master by this push:
     new aa804c8  API test fix
aa804c8 is described below

commit aa804c8db11501639b142a918528a676665b0aa4
Author: Dominik Meister <dominik.meister@hotmail.ch>
AuthorDate: Fri Nov 20 18:22:13 2020 +0100

    API test fix
---
 src/backend/anastasis-httpd_truth.c       |  3 ++-
 src/lib/anastasis_api_keyshare_lookup.c   | 16 +++++-----------
 src/lib/testing_api_cmd_keyshare_lookup.c |  7 +++----
 3 files changed, 10 insertions(+), 16 deletions(-)

diff --git a/src/backend/anastasis-httpd_truth.c 
b/src/backend/anastasis-httpd_truth.c
index 76574d2..25f192e 100644
--- a/src/backend/anastasis-httpd_truth.c
+++ b/src/backend/anastasis-httpd_truth.c
@@ -991,7 +991,8 @@ AH_handler_truth_get (struct MHD_Connection *connection,
     }
     // FIXME:
     // RANDOM! -- or from DB if recent one in DB!
-    uint64_t code = 42;
+    uint64_t code = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_NONCE,
+                                              999999);
     // FIXME TIME where to put this?
     // FIXME retry counter where to put it?
     qs = db->store_challenge_code (db->cls,
diff --git a/src/lib/anastasis_api_keyshare_lookup.c 
b/src/lib/anastasis_api_keyshare_lookup.c
index 6f59623..f34b71c 100644
--- a/src/lib/anastasis_api_keyshare_lookup.c
+++ b/src/lib/anastasis_api_keyshare_lookup.c
@@ -323,17 +323,11 @@ ANASTASIS_keyshare_lookup (struct GNUNET_CURL_Context 
*ctx,
                    "truth/%s",
                    pub_key_str);
 
-  kslo->url = (GNUNET_YES == payment_requested)
-              ? TALER_url_join (backend_url,
-                                path,
-                                "pay",
-                                "y",
-                                NULL)
-              : TALER_url_join (backend_url,
-                                path,
-                                "response",
-                                answer,
-                                NULL);
+  kslo->url = TALER_url_join (backend_url,
+                              path,
+                              "response",
+                              answer,
+                              NULL);
   GNUNET_free (path);
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
diff --git a/src/lib/testing_api_cmd_keyshare_lookup.c 
b/src/lib/testing_api_cmd_keyshare_lookup.c
index c8e1091..c243825 100644
--- a/src/lib/testing_api_cmd_keyshare_lookup.c
+++ b/src/lib/testing_api_cmd_keyshare_lookup.c
@@ -84,7 +84,7 @@ struct KeyShareLookupState
   /**
    * Payment secret used for the payment
    */
-  const struct ANASTASIS_PaymentSecretP *payment_secret;
+  struct ANASTASIS_PaymentSecretP payment_secret;
 
   /**
    * if payment is needed or free
@@ -194,9 +194,8 @@ keyshare_lookup_run (void *cls,
     }
   }
 
-  if (ksls->payment_requested)
+  if (ksls->payment_requested == 1)
   {
-
     const char *order_id;
     const struct TALER_TESTING_Command *payment_cmd;
 
@@ -232,7 +231,7 @@ keyshare_lookup_run (void *cls,
                                           ksls->truth_public_key,
                                           &ksls->truth_key,
                                           ksls->payment_requested,
-                                          ksls->payment_secret,
+                                          &ksls->payment_secret,
                                           ksls->answer,
                                           &keyshare_lookup_cb,
                                           ksls);

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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