gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated: persist interactive successor me


From: gnunet
Subject: [taler-exchange] branch master updated: persist interactive successor measure triggered during aggregation
Date: Mon, 02 Dec 2024 09:25:17 +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 41f2a7bfc persist interactive successor measure triggered during 
aggregation
41f2a7bfc is described below

commit 41f2a7bfcb35cdf763b9af12dbb15d07733b6b33
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Mon Dec 2 09:25:13 2024 +0100

    persist interactive successor measure triggered during aggregation
---
 src/exchange/taler-exchange-aggregator.c       | 34 ++++++++++++++++++++++++++
 src/exchange/taler-exchange-httpd_common_kyc.c |  2 ++
 2 files changed, 36 insertions(+)

diff --git a/src/exchange/taler-exchange-aggregator.c 
b/src/exchange/taler-exchange-aggregator.c
index 6d558f144..fbc6aac41 100644
--- a/src/exchange/taler-exchange-aggregator.c
+++ b/src/exchange/taler-exchange-aggregator.c
@@ -791,6 +791,40 @@ run_measure (
               "Fallback measure %s involves check %s, blocking aggregation\n",
               m->measure_name,
               m->check_name);
+  {
+    /* persist measure */
+    bool unknown_account;
+    struct GNUNET_TIME_Timestamp last_date;
+    json_t *succ_jmeasures = TALER_KYCLOGIC_get_jmeasures (
+      lrs,
+      m->measure_name);
+    enum GNUNET_DB_QueryStatus qs;
+
+    qs = db_plugin->insert_successor_measure (
+      db_plugin->cls,
+      &au->h_normalized_payto,
+      GNUNET_TIME_timestamp_get (),
+      m->measure_name,
+      succ_jmeasures,
+      &unknown_account,
+      &last_date);
+    json_decref (succ_jmeasures);
+    switch (qs)
+    {
+    case GNUNET_DB_STATUS_SOFT_ERROR:
+      GNUNET_log (
+        GNUNET_ERROR_TYPE_INFO,
+        "Serialization issue during aggregation; trying again later!\n");
+      rollback_aggregation (au);
+      return;
+    case GNUNET_DB_STATUS_HARD_ERROR:
+      GNUNET_break (0);
+      fail_aggregation (au);
+      return;
+    default:
+      break;
+    }
+  }
   TALER_KYCLOGIC_rules_free (lrs);
   commit_to_transient (au);
 }
diff --git a/src/exchange/taler-exchange-httpd_common_kyc.c 
b/src/exchange/taler-exchange-httpd_common_kyc.c
index 38a6d7aba..8e0f6033d 100644
--- a/src/exchange/taler-exchange-httpd_common_kyc.c
+++ b/src/exchange/taler-exchange-httpd_common_kyc.c
@@ -1338,6 +1338,8 @@ legitimization_check_run (
 
   /* FIXME(fdold, 2024-11-08): We are doing the same logic
      here and in kyc-info, abstract it out? */
+  /* FIXME(cg-2024-12-02): Also some duplication with
+     code around run_measure in taler-exchange-aggregator! */
 
   /* Check if ruleset is expired and we need to run the successor measure */
   if (NULL != lrs)

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