gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated: psql reproducer


From: gnunet
Subject: [taler-exchange] branch master updated: psql reproducer
Date: Wed, 06 Mar 2024 22:02:42 +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 9173d274 psql reproducer
9173d274 is described below

commit 9173d2747f00921dccf1678b877f7f250fca9cd3
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Wed Mar 6 22:02:38 2024 +0100

    psql reproducer
---
 contrib/wallet-core                            |  2 +-
 src/exchange/taler-exchange-httpd.c            |  1 -
 src/exchangedb/pg_lookup_transfer_by_deposit.c | 26 +++++++++++++++++++-------
 3 files changed, 20 insertions(+), 9 deletions(-)

diff --git a/contrib/wallet-core b/contrib/wallet-core
index 286b4a1a..c0f30699 160000
--- a/contrib/wallet-core
+++ b/contrib/wallet-core
@@ -1 +1 @@
-Subproject commit 286b4a1ade68c0cc0dfbb2ff876364538020fd06
+Subproject commit c0f3069970e24d1fa9e308347350d6e5221aed88
diff --git a/src/exchange/taler-exchange-httpd.c 
b/src/exchange/taler-exchange-httpd.c
index bc8e76ab..59ec9634 100644
--- a/src/exchange/taler-exchange-httpd.c
+++ b/src/exchange/taler-exchange-httpd.c
@@ -2710,7 +2710,6 @@ run (void *cls,
   global_ret = EXIT_SUCCESS;
   TALER_MHD_daemon_start (mhd);
   atexit (&write_stats);
-
 #if HAVE_DEVELOPER
   if (NULL != input_filename)
     run_single_request ();
diff --git a/src/exchangedb/pg_lookup_transfer_by_deposit.c 
b/src/exchangedb/pg_lookup_transfer_by_deposit.c
index 425a11d3..cb600f08 100644
--- a/src/exchangedb/pg_lookup_transfer_by_deposit.c
+++ b/src/exchangedb/pg_lookup_transfer_by_deposit.c
@@ -141,36 +141,43 @@ TEH_PG_lookup_transfer_by_deposit (
                                             &wire_salt),
       GNUNET_PQ_result_spec_string ("payto_uri",
                                     &payto_uri),
+#define BUG 1
+#if BUG
       GNUNET_PQ_result_spec_allow_null (
         GNUNET_PQ_result_spec_uint64 ("legitimization_requirement_serial_id",
                                       &kyc->requirement_row),
         NULL),
+#endif
       GNUNET_PQ_result_spec_allow_null (
         GNUNET_PQ_result_spec_uint64 ("kyc_requirement",
                                       &aml_kyc_row),
         NULL),
+      GNUNET_PQ_result_spec_allow_null (
+        GNUNET_PQ_result_spec_uint32 ("status",
+                                      &status32),
+        NULL),
       TALER_PQ_RESULT_SPEC_AMOUNT ("amount_with_fee",
                                    amount_with_fee),
       TALER_PQ_RESULT_SPEC_AMOUNT ("fee_deposit",
                                    deposit_fee),
       GNUNET_PQ_result_spec_timestamp ("wire_deadline",
                                        exec_time),
-      GNUNET_PQ_result_spec_allow_null (
-        GNUNET_PQ_result_spec_uint32 ("status",
-                                      &status32),
-        NULL),
       GNUNET_PQ_result_spec_end
     };
 
+    GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+                "Got the special place...\n");
     PREPARE (pg,
              "get_deposit_without_wtid",
              "SELECT"
-             " agt.legitimization_requirement_serial_id"
-             ",bdep.wire_salt"
+             " bdep.wire_salt"
              ",wt.payto_uri"
              ",cdep.amount_with_fee"
              ",denom.fee_deposit"
              ",bdep.wire_deadline"
+#if BUG
+             ",agt.legitimization_requirement_serial_id"
+#endif
              ",aml.status"
              ",aml.kyc_requirement"
              " FROM coin_deposits cdep"
@@ -182,9 +189,11 @@ TEH_PG_lookup_transfer_by_deposit (
              "   ON (kc.coin_pub = cdep.coin_pub)"
              " JOIN denominations denom"
              "   USING (denominations_serial)"
+#if BUG
              " LEFT JOIN aggregation_transient agt "
              "   ON ( (bdep.wire_target_h_payto = agt.wire_target_h_payto) AND"
              "        (bdep.merchant_pub = agt.merchant_pub) )"
+#endif
              " LEFT JOIN aml_status aml"
              "   ON (wt.wire_target_h_payto = aml.h_payto)"
              " WHERE cdep.coin_pub=$1"
@@ -215,12 +224,15 @@ TEH_PG_lookup_transfer_by_deposit (
       TALER_merchant_wire_signature_hash (payto_uri,
                                           &wire_salt,
                                           &wh);
-      GNUNET_PQ_cleanup_result (rs);
       if (0 !=
           GNUNET_memcmp (&wh,
                          h_wire))
+      {
+        GNUNET_PQ_cleanup_result (rs);
         return GNUNET_DB_STATUS_SUCCESS_NO_RESULTS;
+      }
     }
+    GNUNET_PQ_cleanup_result (rs);
     *aml_decision = TALER_AML_NORMAL;
     return qs;
   }

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