exchange

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

commit 9c882c3c06caf6bce1f248e68e496cb6283efdf8
parent 7c9cffaae38d58e03f6504482102357a0d1ed832
Author: Florian Dold <florian@dold.me>
Date:   Mon,  9 Dec 2024 19:46:24 +0100

lookup_rules_by_access_token: do not filter out expired outcomes

Otherwise, successor measures can't be applied, as only default rules would apply

Diffstat:
Msrc/exchange/taler-exchange-httpd_refund.c | 2+-
Msrc/exchangedb/exchangedb_aml.c | 3+++
Msrc/exchangedb/pg_lookup_rules_by_access_token.c | 4----
3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/exchange/taler-exchange-httpd_refund.c b/src/exchange/taler-exchange-httpd_refund.c @@ -229,7 +229,7 @@ verify_and_execute_refund (struct MHD_Connection *connection, &refund->coin.coin_pub, &rctx.known_coin_id, &refund->coin.denom_pub_hash); - if (0 >= qs) + if (0 > qs) { MHD_RESULT res; char *dhs; diff --git a/src/exchangedb/exchangedb_aml.c b/src/exchangedb/exchangedb_aml.c @@ -651,6 +651,9 @@ fetch_latest_rules (void *cls) json_t *jnew_rules; enum GNUNET_GenericReturnValue res; + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Fetching latest rules."); + ru->t = NULL; if (NULL != ru->eh) { diff --git a/src/exchangedb/pg_lookup_rules_by_access_token.c b/src/exchangedb/pg_lookup_rules_by_access_token.c @@ -34,10 +34,8 @@ TEH_PG_lookup_rules_by_access_token ( uint64_t *rowid) { struct PostgresClosure *pg = cls; - struct GNUNET_TIME_Absolute now; struct GNUNET_PQ_QueryParam params[] = { GNUNET_PQ_query_param_auto_from_type (h_payto), - GNUNET_PQ_query_param_absolute_time (&now), GNUNET_PQ_query_param_end }; struct GNUNET_PQ_ResultSpec rs[] = { @@ -60,12 +58,10 @@ TEH_PG_lookup_rules_by_access_token ( ",outcome_serial_id AS row_id" " FROM legitimization_outcomes" " WHERE h_payto=$1" - " AND expiration_time>$2" " AND is_active" " ORDER BY expiration_time DESC," " outcome_serial_id DESC" " LIMIT 1;"); - now = GNUNET_TIME_absolute_get (); return GNUNET_PQ_eval_prepared_singleton_select ( pg->conn, "lookup_rules_by_access_token",