diff options
author | Christian Grothoff <grothoff@gnunet.org> | 2023-12-25 02:12:45 +0800 |
---|---|---|
committer | Christian Grothoff <grothoff@gnunet.org> | 2023-12-25 02:12:45 +0800 |
commit | fba64a564e04aa4897120c9444e8cb4f8f54ab68 (patch) | |
tree | c715990d204764a882e3b5a231c38a6ffc5b0569 /src/exchangedb/pg_select_purse_merge.c | |
parent | 3eebc4b18ae109ea54e5f8788ac29453f74282ac (diff) | |
download | exchange-fba64a564e04aa4897120c9444e8cb4f8f54ab68.tar.xz |
fix #8015 (allow purse merge until they were actually expired/refunded)
Diffstat (limited to 'src/exchangedb/pg_select_purse_merge.c')
-rw-r--r-- | src/exchangedb/pg_select_purse_merge.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/exchangedb/pg_select_purse_merge.c b/src/exchangedb/pg_select_purse_merge.c index ce9f03618..d58e8892f 100644 --- a/src/exchangedb/pg_select_purse_merge.c +++ b/src/exchangedb/pg_select_purse_merge.c @@ -33,7 +33,8 @@ TEH_PG_select_purse_merge ( struct TALER_PurseMergeSignatureP *merge_sig, struct GNUNET_TIME_Timestamp *merge_timestamp, char **partner_url, - struct TALER_ReservePublicKeyP *reserve_pub) + struct TALER_ReservePublicKeyP *reserve_pub, + bool *refunded) { struct PostgresClosure *pg = cls; struct GNUNET_PQ_QueryParam params[] = { @@ -52,11 +53,15 @@ TEH_PG_select_purse_merge ( GNUNET_PQ_result_spec_string ("partner_base_url", partner_url), &is_null), + GNUNET_PQ_result_spec_allow_null ( + GNUNET_PQ_result_spec_bool ("refunded", + refunded), + NULL), GNUNET_PQ_result_spec_end }; *partner_url = NULL; - /* Used in #postgres_select_purse_merge */ + *refunded = true; PREPARE (pg, "select_purse_merge", "SELECT " @@ -64,7 +69,9 @@ TEH_PG_select_purse_merge ( ",merge_sig" ",merge_timestamp" ",partner_base_url" + ",refunded" " FROM purse_merges" + " LEFT JOIN purse_decision USING (purse_pub)" " LEFT JOIN partners USING (partner_serial_id)" " WHERE purse_pub=$1;"); return GNUNET_PQ_eval_prepared_singleton_select (pg->conn, |