aboutsummaryrefslogtreecommitdiff
path: root/src/auditordb/pg_get_amount_arithmetic_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_amount_arithmetic_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_amount_arithmetic_inconsistency.c')
-rw-r--r--src/auditordb/pg_get_amount_arithmetic_inconsistency.c45
1 files changed, 24 insertions, 21 deletions
diff --git a/src/auditordb/pg_get_amount_arithmetic_inconsistency.c b/src/auditordb/pg_get_amount_arithmetic_inconsistency.c
index 312d9e233..a23fa40bd 100644
--- a/src/auditordb/pg_get_amount_arithmetic_inconsistency.c
+++ b/src/auditordb/pg_get_amount_arithmetic_inconsistency.c
@@ -111,12 +111,12 @@ TAH_PG_get_amount_arithmetic_inconsistency (
struct PostgresClosure *pg = cls;
- struct GNUNET_PQ_QueryParam params[] = {
- GNUNET_PQ_query_param_uint64 (&offset),
- GNUNET_PQ_query_param_bool (return_suppressed),
- GNUNET_PQ_query_param_int64 (&limit),
- GNUNET_PQ_query_param_end
- };
+ struct GNUNET_PQ_QueryParam params[] = {
+ GNUNET_PQ_query_param_uint64 (&offset),
+ GNUNET_PQ_query_param_bool (return_suppressed),
+ GNUNET_PQ_query_param_int64 (&limit),
+ GNUNET_PQ_query_param_end
+ };
struct AmountArithmeticInconsistencyContext dcc = {
.cb = cb,
.cb_cls = cb_cls,
@@ -138,22 +138,25 @@ TAH_PG_get_amount_arithmetic_inconsistency (
" ORDER BY row_id DESC"
" LIMIT $3"
);
- PREPARE (pg,
- "auditor_amount_arithmetic_inconsistency_select_asc",
- "SELECT"
- " row_id"
- ",operation"
- ",exchange_amount"
- ",auditor_amount"
- ",profitable"
- " FROM auditor_amount_arithmetic_inconsistency"
- " WHERE (row_id>$1)"
- " AND ($2 OR suppressed is false)"
- " ORDER BY row_id ASC"
- " LIMIT $3"
- );
+ PREPARE (pg,
+ "auditor_amount_arithmetic_inconsistency_select_asc",
+ "SELECT"
+ " row_id"
+ ",operation"
+ ",exchange_amount"
+ ",auditor_amount"
+ ",profitable"
+ " FROM auditor_amount_arithmetic_inconsistency"
+ " WHERE (row_id>$1)"
+ " AND ($2 OR suppressed is false)"
+ " ORDER BY row_id ASC"
+ " LIMIT $3"
+ );
qs = GNUNET_PQ_eval_prepared_multi_select (pg->conn,
- (limit > 0) ? "auditor_amount_arithmetic_inconsistency_select_asc" : "auditor_amount_arithmetic_inconsistency_select_desc",
+ (limit > 0) ?
+ "auditor_amount_arithmetic_inconsistency_select_asc"
+ :
+ "auditor_amount_arithmetic_inconsistency_select_desc",
params,
&amount_arithmetic_inconsistency_cb,
&dcc);