[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] 01/02: use history table
From: |
gnunet |
Subject: |
[taler-exchange] 01/02: use history table |
Date: |
Tue, 17 Oct 2023 13:11:31 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
commit 6f97d6b8cb41f7c785d11ee34041b2ec42082cd4
Author: Christian Grothoff <grothoff@gnunet.org>
AuthorDate: Tue Oct 17 13:03:32 2023 +0200
use history table
---
src/exchangedb/pg_select_withdraw_amounts_for_kyc_check.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/exchangedb/pg_select_withdraw_amounts_for_kyc_check.c
b/src/exchangedb/pg_select_withdraw_amounts_for_kyc_check.c
index 8875e22c..71ed8183 100644
--- a/src/exchangedb/pg_select_withdraw_amounts_for_kyc_check.c
+++ b/src/exchangedb/pg_select_withdraw_amounts_for_kyc_check.c
@@ -137,13 +137,15 @@ TEH_PG_select_withdraw_amounts_for_kyc_check (
"SELECT"
" ro.amount_with_fee AS amount"
",ro.execution_date AS date"
- " FROM reserves_out ro"
- " JOIN reserves_out_by_reserve USING (h_blind_ev)"
- " JOIN reserves res ON (ro.reserve_uuid = res.reserve_uuid)"
- " JOIN reserves_in ri ON (res.reserve_pub = ri.reserve_pub)"
- " WHERE wire_source_h_payto=$1"
+ " FROM reserves_in ri"
+ " JOIN reserve_history rh"
+ " ON (rh.reserve_pub = ri.reserve_pub)"
+ " JOIN reserves_out ro"
+ " ON (ro.reserve_out_serial_id = rh.serial_id)"
+ " WHERE ri.wire_source_h_payto=$1"
+ " AND rh.table_name='reserves_out'"
" AND ro.execution_date >= $2"
- " ORDER BY ro.execution_date DESC");
+ " ORDER BY rh.reserve_history_serial_id DESC");
qs = GNUNET_PQ_eval_prepared_multi_select (
pg->conn,
"select_kyc_relevant_withdraw_events",
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.