summaryrefslogtreecommitdiff
path: root/src/auditordb/pg_get_reserve_in_inconsistency.c
diff options
context:
space:
mode:
authorNic Eigel <nic@eigel.ch>2024-04-26 09:32:25 +0200
committerNic Eigel <nic@eigel.ch>2024-04-26 09:32:25 +0200
commit157dd4fa26a039bf2600290b2680b3ba79b15b2a (patch)
tree39b3f1a2af210fd3a0fdcb9bbd712b5dd7c1f2cc /src/auditordb/pg_get_reserve_in_inconsistency.c
parentba41bba2a251d00bd2411782890b9ae003243a98 (diff)
parent72f9b0cb96ee7daaa92f8e6891078fa5e0119ab3 (diff)
downloadexchange-157dd4fa26a039bf2600290b2680b3ba79b15b2a.tar.gz
exchange-157dd4fa26a039bf2600290b2680b3ba79b15b2a.tar.bz2
exchange-157dd4fa26a039bf2600290b2680b3ba79b15b2a.zip
Merge remote-tracking branch 'origin/dev/nic/real-time-auditor-zwah' into dev/nic/real-time-auditor
# Conflicts: # src/auditor/taler-auditor-httpd_denominations-without-sigs-get.c # src/auditor/taler-auditor-httpd_deposit-confirmation-get.c # src/auditor/taler-auditor-httpd_purse-not-closed-inconsistencies-get.c # src/auditor/test-auditor.sh # src/auditordb/pg_insert_reserve_balance_summary_wrong_inconsistency.c
Diffstat (limited to 'src/auditordb/pg_get_reserve_in_inconsistency.c')
-rw-r--r--src/auditordb/pg_get_reserve_in_inconsistency.c59
1 files changed, 28 insertions, 31 deletions
diff --git a/src/auditordb/pg_get_reserve_in_inconsistency.c b/src/auditordb/pg_get_reserve_in_inconsistency.c
index 22950f537..1ad3559ac 100644
--- a/src/auditordb/pg_get_reserve_in_inconsistency.c
+++ b/src/auditordb/pg_get_reserve_in_inconsistency.c
@@ -1,6 +1,3 @@
-
-
-
/*
This file is part of TALER
Copyright (C) 2024 Taler Systems SA
@@ -63,8 +60,8 @@ struct ReserveInInconsistencyContext
*/
static void
reserve_in_inconsistency_cb (void *cls,
- PGresult *result,
- unsigned int num_results)
+ PGresult *result,
+ unsigned int num_results)
{
struct ReserveInInconsistencyContext *dcc = cls;
struct PostgresClosure *pg = dcc->pg;
@@ -79,13 +76,14 @@ reserve_in_inconsistency_cb (void *cls,
GNUNET_PQ_result_spec_uint64 ("row_id", &serial_id),
- TALER_PQ_RESULT_SPEC_AMOUNT("amount_exchange_expected", &dc.amount_exchange_expected),
-TALER_PQ_RESULT_SPEC_AMOUNT("amount_wired", &dc.amount_wired),
-GNUNET_PQ_result_spec_auto_from_type("reserve_pub", &dc.reserve_pub),
-GNUNET_PQ_result_spec_int64("timestamp", &dc.timestamp),
-GNUNET_PQ_result_spec_auto_from_type("account", &dc.account),
-GNUNET_PQ_result_spec_auto_from_type("diagnostic", &dc.diagnostic),
-GNUNET_PQ_result_spec_bool("suppressed", &dc.suppressed),
+ TALER_PQ_RESULT_SPEC_AMOUNT ("amount_exchange_expected",
+ &dc.amount_exchange_expected),
+ TALER_PQ_RESULT_SPEC_AMOUNT ("amount_wired", &dc.amount_wired),
+ GNUNET_PQ_result_spec_auto_from_type ("reserve_pub", &dc.reserve_pub),
+ GNUNET_PQ_result_spec_int64 ("timestamp", &dc.timestamp),
+ GNUNET_PQ_result_spec_auto_from_type ("account", &dc.account),
+ GNUNET_PQ_result_spec_auto_from_type ("diagnostic", &dc.diagnostic),
+ GNUNET_PQ_result_spec_bool ("suppressed", &dc.suppressed),
GNUNET_PQ_result_spec_end
@@ -142,13 +140,13 @@ TAH_PG_get_reserve_in_inconsistency (
"auditor_reserve_in_inconsistency_get_desc",
"SELECT"
" row_id,"
-" amount_exchange_expected,"
-" amount_wired,"
-" reserve_pub,"
-" timestamp,"
-" account,"
-" diagnostic,"
-" suppressed"
+ " amount_exchange_expected,"
+ " amount_wired,"
+ " reserve_pub,"
+ " timestamp,"
+ " account,"
+ " diagnostic,"
+ " suppressed"
" FROM auditor_reserve_in_inconsistency"
" WHERE (row_id < $1)"
" AND ($2 OR suppressed is false)"
@@ -159,13 +157,13 @@ TAH_PG_get_reserve_in_inconsistency (
"auditor_reserve_in_inconsistency_get_asc",
"SELECT"
" row_id,"
-" amount_exchange_expected,"
-" amount_wired,"
-" reserve_pub,"
-" timestamp,"
-" account,"
-" diagnostic,"
-" suppressed"
+ " amount_exchange_expected,"
+ " amount_wired,"
+ " reserve_pub,"
+ " timestamp,"
+ " account,"
+ " diagnostic,"
+ " suppressed"
" FROM auditor_reserve_in_inconsistency"
" WHERE (row_id > $1)"
" AND ($2 OR suppressed is false)"
@@ -174,8 +172,10 @@ TAH_PG_get_reserve_in_inconsistency (
);
qs = GNUNET_PQ_eval_prepared_multi_select (pg->conn,
(limit > 0)
- ? "auditor_reserve_in_inconsistency_get_asc"
- : "auditor_reserve_in_inconsistency_get_desc",
+ ?
+ "auditor_reserve_in_inconsistency_get_asc"
+ :
+ "auditor_reserve_in_inconsistency_get_desc",
params,
&reserve_in_inconsistency_cb,
&dcc);
@@ -185,6 +185,3 @@ TAH_PG_get_reserve_in_inconsistency (
GNUNET_break (GNUNET_DB_STATUS_HARD_ERROR != qs);
return qs;
}
-
-
- \ No newline at end of file