exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

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

persist interactive successor measure triggered during aggregation

Diffstat:
Msrc/exchange/taler-exchange-aggregator.c | 34++++++++++++++++++++++++++++++++++
Msrc/exchange/taler-exchange-httpd_common_kyc.c | 2++
2 files changed, 36 insertions(+), 0 deletions(-)

diff --git 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 @@ -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)