exchange

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

commit bf0515bd0f532bd47ad0a22fdb30636e33529e1a
parent 84af6e30af6e0b7c40f773dc05054e63d6313eae
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sat, 13 Jun 2026 21:10:20 +0200

fix typo, also remove GNUNET_PQ_connect()

Diffstat:
Msrc/exchangedb/gc.c | 4++--
Msrc/pq/test_pq.c | 25++++++++++++++++++++-----
2 files changed, 22 insertions(+), 7 deletions(-)

diff --git a/src/exchangedb/gc.c b/src/exchangedb/gc.c @@ -43,14 +43,14 @@ TALER_EXCHANGEDB_gc (struct TALER_EXCHANGEDB_PostgresContext *pg) GNUNET_TIME_UNIT_YEARS, 10)); if (GNUNET_OK != - GNUNET_PQ_prepare_anon (gc->conn, + GNUNET_PQ_prepare_anon (pg->conn, "CALL exchange_do_gc($1,$2);")) { GNUNET_break (0); return GNUNET_SYSERR; } if (0 > - GNUNET_PQ_eval_prepared_non_select (gc->conn, + GNUNET_PQ_eval_prepared_non_select (pg->conn, "", params)) { diff --git a/src/pq/test_pq.c b/src/pq/test_pq.c @@ -343,18 +343,34 @@ main (int argc, }; struct GNUNET_PQ_Context *conn; int ret; + struct GNUNET_CONFIGURATION_Handle *cfg; (void) argc; (void) argv; GNUNET_log_setup ("test-pq", "WARNING", NULL); - conn = GNUNET_PQ_connect ("postgres:///talercheck", - NULL, - es, - NULL); + cfg = GNUNET_CONFIGURATION_create ( + TALER_EXCHANGE_project_data ()); + GNUNET_CONFIGURATION_set_value_string (cfg, + "test-pq", + "CONFIG", + "postgres:///talercheck"); + /* just to squash warning */ + GNUNET_CONFIGURATION_set_value_string (cfg, + "test-pq", + "SQL_DIR", + "none"); + conn = GNUNET_PQ_init (cfg, + "test-pq", + NULL, + NULL); + GNUNET_CONFIGURATION_destroy (cfg); if (NULL == conn) return 77; + GNUNET_assert (GNUNET_OK == + GNUNET_PQ_exec_statements (conn, + es)); if (GNUNET_OK != postgres_prepare (conn)) { @@ -362,7 +378,6 @@ main (int argc, GNUNET_PQ_disconnect (conn); return 1; } - ret = run_queries (conn); { struct GNUNET_PQ_ExecuteStatement ds[] = {