diff options
Diffstat (limited to 'src/auditordb/pg_get_amount_arithmetic_inconsistency.c')
-rw-r--r-- | src/auditordb/pg_get_amount_arithmetic_inconsistency.c | 45 |
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); |