gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated: -get p2p test to pass


From: gnunet
Subject: [taler-exchange] branch master updated: -get p2p test to pass
Date: Wed, 27 Apr 2022 13:28:33 +0200

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 3e8c797b -get p2p test to pass
3e8c797b is described below

commit 3e8c797bb78dfc0731bfce17e2401d3247ad4d10
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Wed Apr 27 13:28:28 2022 +0200

    -get p2p test to pass
---
 src/exchange/taler-exchange-httpd_purses_deposit.c |  1 -
 src/lib/exchange_api_purse_deposit.c               | 16 +++++++++-------
 src/testing/Makefile.am                            |  2 +-
 src/util/crypto_contract.c                         |  6 ------
 4 files changed, 10 insertions(+), 15 deletions(-)

diff --git a/src/exchange/taler-exchange-httpd_purses_deposit.c 
b/src/exchange/taler-exchange-httpd_purses_deposit.c
index e2a5d34f..d29487af 100644
--- a/src/exchange/taler-exchange-httpd_purses_deposit.c
+++ b/src/exchange/taler-exchange-httpd_purses_deposit.c
@@ -325,7 +325,6 @@ parse_coin (struct MHD_Connection *connection,
     if (GNUNET_OK != res)
       return res;
   }
-
   if (GNUNET_OK !=
       TALER_wallet_purse_deposit_verify (TEH_base_url,
                                          pcc->purse_pub,
diff --git a/src/lib/exchange_api_purse_deposit.c 
b/src/lib/exchange_api_purse_deposit.c
index 540be0e2..dfe9a6ec 100644
--- a/src/lib/exchange_api_purse_deposit.c
+++ b/src/lib/exchange_api_purse_deposit.c
@@ -70,11 +70,6 @@ struct TALER_EXCHANGE_PurseDepositHandle
    */
   void *cb_cls;
 
-  /**
-   * Expected value in the purse after fees.
-   */
-  struct TALER_Amount purse_value_after_fees;
-
   /**
    * Public key of the purse.
    */
@@ -102,8 +97,10 @@ handle_purse_deposit_finished (void *cls,
     .hr.reply = j,
     .hr.http_status = (unsigned int) response_code
   };
+  const struct TALER_EXCHANGE_Keys *keys;
 
   pch->job = NULL;
+  keys = TALER_EXCHANGE_get_keys (pch->exchange);
   switch (response_code)
   {
   case 0:
@@ -124,7 +121,7 @@ handle_purse_deposit_finished (void *cls,
         GNUNET_JSON_spec_timestamp ("exchange_timestamp",
                                     &etime),
         TALER_JSON_spec_amount ("total_deposited",
-                                pch->purse_value_after_fees.currency,
+                                keys->currency,
                                 &total_deposited),
         GNUNET_JSON_spec_end ()
       };
@@ -242,6 +239,11 @@ TALER_EXCHANGE_purse_deposit (
   char *url;
   char arg_str[sizeof (pch->purse_pub) * 2 + 32];
 
+  if (0 == num_deposits)
+  {
+    GNUNET_break (0);
+    return NULL;
+  }
   GNUNET_assert (GNUNET_YES ==
                  TEAH_handle_is_ready (exchange));
   pch = GNUNET_new (struct TALER_EXCHANGE_PurseDepositHandle);
@@ -301,9 +303,9 @@ TALER_EXCHANGE_purse_deposit (
       GNUNET_free (pch);
       return NULL;
     }
+#endif
     GNUNET_CRYPTO_eddsa_key_get_public (&deposit->coin_priv.eddsa_priv,
                                         &coin_pub.eddsa_pub);
-#endif
     TALER_wallet_purse_deposit_sign (
       url,
       &pch->purse_pub,
diff --git a/src/testing/Makefile.am b/src/testing/Makefile.am
index b985dd28..56b009af 100644
--- a/src/testing/Makefile.am
+++ b/src/testing/Makefile.am
@@ -286,7 +286,7 @@ test_exchange_api_rsa_LDADD = \
   $(XLIB)
 
 test_exchange_p2p_cs_SOURCES = \
-  test_exchange_api.c
+  test_exchange_p2p.c
 test_exchange_p2p_cs_LDADD = \
   libtalertesting.la \
   $(top_builddir)/src/lib/libtalerexchange.la \
diff --git a/src/util/crypto_contract.c b/src/util/crypto_contract.c
index bcfe9523..fe6b1e6a 100644
--- a/src/util/crypto_contract.c
+++ b/src/util/crypto_contract.c
@@ -278,9 +278,6 @@ TALER_CRYPTO_contract_encrypt_for_merge (
   GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_NONCE,
                               &nonce,
                               sizeof (nonce));
-  GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-              "Encrypting with key %s\n",
-              TALER_B2S (&key));
   contract_encrypt (&nonce,
                     &key,
                     sizeof (key),
@@ -318,9 +315,6 @@ TALER_CRYPTO_contract_decrypt_for_merge (
     GNUNET_break (0);
     return NULL;
   }
-  GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-              "Decrypting with key %s\n",
-              TALER_B2S (&key));
   if (GNUNET_OK !=
       contract_decrypt (&key,
                         sizeof (key),

-- 
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]