exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit 366cff46cb8b36f26f292b21414fe010bf632c66
parent 5c0664f042279cea7166c203c023d9a890286e72
Author: Christian Grothoff <grothoff@gnunet.org>
Date:   Sun, 16 Aug 2026 08:49:57 +0200

add missing fields for row

Diffstat:
Msrc/auditor/taler-auditor-httpd_get-monitoring-coin-inconsistency.c | 4+++-
Msrc/auditordb/iterate_coin_inconsistencies.c | 10++++++----
Msrc/include/auditordb_lib.h | 1+
3 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-coin-inconsistency.c b/src/auditor/taler-auditor-httpd_get-monitoring-coin-inconsistency.c @@ -44,11 +44,13 @@ add_coin_inconsistency ( json_t *obj; obj = GNUNET_JSON_PACK ( + GNUNET_JSON_pack_uint64 ("row_id", serial_id), GNUNET_JSON_pack_string ("operation", dc->operation), TALER_JSON_pack_amount ("exchange_amount", &dc->exchange_amount), TALER_JSON_pack_amount ("auditor_amount", &dc->auditor_amount), GNUNET_JSON_pack_data_auto ("coin_pub",&dc->coin_pub), - GNUNET_JSON_pack_bool ("profitable", dc->profitable) + GNUNET_JSON_pack_bool ("profitable", dc->profitable), + GNUNET_JSON_pack_bool ("suppressed", dc->suppressed) ); GNUNET_break (0 == json_array_append_new (list, diff --git a/src/auditordb/iterate_coin_inconsistencies.c b/src/auditordb/iterate_coin_inconsistencies.c @@ -75,13 +75,11 @@ coin_inconsistency_cb (void *cls, for (unsigned int i = 0; i < num_results; i++) { - uint64_t serial_id; - struct TALER_AUDITORDB_CoinInconsistency dc; struct GNUNET_PQ_ResultSpec rs[] = { GNUNET_PQ_result_spec_uint64 ("row_id", - &serial_id), + &dc.row_id), GNUNET_PQ_result_spec_string ("operation", &dc.operation), TALER_PQ_RESULT_SPEC_AMOUNT ("exchange_amount", @@ -91,6 +89,8 @@ coin_inconsistency_cb (void *cls, GNUNET_PQ_result_spec_auto_from_type ("coin_pub", &dc.coin_pub), GNUNET_PQ_result_spec_bool ("profitable", &dc.profitable), + GNUNET_PQ_result_spec_bool ("suppressed", + &dc.suppressed), GNUNET_PQ_result_spec_end }; @@ -110,7 +110,7 @@ coin_inconsistency_cb (void *cls, rval = dcc->cb (dcc->cb_cls, - serial_id, + dc.row_id, &dc); GNUNET_PQ_cleanup_result (rs); if (GNUNET_OK != rval) @@ -154,6 +154,7 @@ TALER_AUDITORDB_iterate_coin_inconsistencies ( ",auditor_amount" ",coin_pub" ",profitable" + ",suppressed" " FROM auditor_coin_inconsistency" " WHERE (row_id < $1)" " AND ($2 OR suppressed is false)" @@ -169,6 +170,7 @@ TALER_AUDITORDB_iterate_coin_inconsistencies ( ",auditor_amount" ",coin_pub" ",profitable" + ",suppressed" " FROM auditor_coin_inconsistency" " WHERE (row_id > $1)" " AND ($2 OR suppressed is false)" diff --git a/src/include/auditordb_lib.h b/src/include/auditordb_lib.h @@ -152,6 +152,7 @@ struct TALER_AUDITORDB_CoinInconsistency struct TALER_Amount auditor_amount; struct GNUNET_CRYPTO_EddsaPublicKey coin_pub; bool profitable; + bool suppressed; }; /**