exchange

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

commit b95094862287fcdff6ebecc6f5b2a0e5f7e6867f
parent 0cae15196ceb54817b33c6889aeb0322f431fff4
Author: Christian Grothoff <christian@grothoff.org>
Date:   Tue,  3 Nov 2026 23:04:35 +0100

use non-human timestamps, as per protocol v3

Diffstat:
Msrc/auditor/taler-auditor-httpd_get-monitoring-aml-holds.c | 13+++++++------
Msrc/auditor/taler-auditor-httpd_get-monitoring-closure-lags.c | 13+++++++------
Msrc/auditor/taler-auditor-httpd_get-monitoring-denomination-key-validity-withdraw-inconsistency.c | 13+++++++------
Msrc/auditor/taler-auditor-httpd_get-monitoring-denominations-without-sigs.c | 18++++++++++--------
Msrc/auditor/taler-auditor-httpd_get-monitoring-emergency-by-count.c | 18++++++++++--------
Msrc/auditor/taler-auditor-httpd_get-monitoring-emergency.c | 18++++++++++--------
Msrc/auditor/taler-auditor-httpd_get-monitoring-fee-time-inconsistency.c | 13+++++++------
Msrc/auditor/taler-auditor-httpd_get-monitoring-historic-denomination-revenue.c | 12++++++------
Msrc/auditor/taler-auditor-httpd_get-monitoring-historic-reserve-summary.c | 16++++++++--------
Msrc/auditor/taler-auditor-httpd_get-monitoring-kycauth-in-inconsistency.c | 13+++++++------
Msrc/auditor/taler-auditor-httpd_get-monitoring-purse-not-closed-inconsistencies.c | 13+++++++------
Msrc/auditor/taler-auditor-httpd_get-monitoring-purses.c | 12+++++++-----
Msrc/auditor/taler-auditor-httpd_get-monitoring-reserve-in-inconsistency.c | 13+++++++------
Msrc/auditor/taler-auditor-httpd_get-monitoring-reserve-not-closed-inconsistency.c | 13+++++++------
Msrc/auditor/taler-auditor-httpd_get-monitoring-reserves.c | 13+++++++------
15 files changed, 114 insertions(+), 97 deletions(-)

diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-aml-holds.c b/src/auditor/taler-auditor-httpd_get-monitoring-aml-holds.c @@ -83,8 +83,9 @@ process_aml_holds ( reason2s (ah->deferral_reason)), GNUNET_JSON_pack_uint64 ("legitimization_measure_serial_id", ah->legitimization_measure_serial_id), - TALER_JSON_pack_time_abs_human ("first_seen", - ah->creation_date), + GNUNET_JSON_pack_timestamp ("first_seen", + GNUNET_TIME_absolute_to_timestamp ( + ah->creation_date)), GNUNET_JSON_pack_bool ("suppressed", ah->suppressed) ); @@ -120,15 +121,15 @@ TAH_get_monitoring_aml_holds ( NULL); } TAH_PARSE_REQUEST_LIMIT (connection, - "limit", - &limit); + "limit", + &limit); if (limit < 0) offset = TAH_SAFE_UINT64_MAX; else offset = 0; TAH_PARSE_SAFE_REQUEST_NUMBER (connection, - "offset", - &offset); + "offset", + &offset); { const char *ret_s = MHD_lookup_connection_value (connection, diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-closure-lags.c b/src/auditor/taler-auditor-httpd_get-monitoring-closure-lags.c @@ -48,8 +48,9 @@ process_closure_lags ( dc->problem_row_id), TALER_JSON_pack_amount ("amount", &dc->amount), - TALER_JSON_pack_time_abs_human ("deadline", - dc->deadline), + GNUNET_JSON_pack_timestamp ("deadline", + GNUNET_TIME_absolute_to_timestamp ( + dc->deadline)), GNUNET_JSON_pack_data_auto ("wtid", &dc->wtid), TALER_JSON_pack_full_payto ("account", @@ -91,15 +92,15 @@ TAH_get_monitoring_closure_lags ( NULL); } TAH_PARSE_REQUEST_LIMIT (connection, - "limit", - &limit); + "limit", + &limit); if (limit < 0) offset = TAH_SAFE_UINT64_MAX; else offset = 0; TAH_PARSE_SAFE_REQUEST_NUMBER (connection, - "offset", - &offset); + "offset", + &offset); { const char *ret_s = MHD_lookup_connection_value (connection, diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-denomination-key-validity-withdraw-inconsistency.c b/src/auditor/taler-auditor-httpd_get-monitoring-denomination-key-validity-withdraw-inconsistency.c @@ -49,8 +49,9 @@ process_denomination_key_validity_withdraw_inconsistency ( dc->row_id), GNUNET_JSON_pack_uint64 ("problem_row_id", dc->problem_row_id), - TALER_JSON_pack_time_abs_human ("execution_date", - dc->execution_date), + GNUNET_JSON_pack_timestamp ("execution_date", + GNUNET_TIME_absolute_to_timestamp ( + dc->execution_date)), GNUNET_JSON_pack_data_auto ("reserve_pub", &dc->reserve_pub), GNUNET_JSON_pack_data_auto ("h_denom_pub", @@ -96,15 +97,15 @@ TAH_get_monitoring_denomination_key_validity_withdraw_inconsistency ( NULL); } TAH_PARSE_REQUEST_LIMIT (connection, - "limit", - &limit); + "limit", + &limit); if (limit < 0) offset = TAH_SAFE_UINT64_MAX; else offset = 0; TAH_PARSE_SAFE_REQUEST_NUMBER (connection, - "offset", - &offset); + "offset", + &offset); { const char *ret_s = MHD_lookup_connection_value (connection, diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-denominations-without-sigs.c b/src/auditor/taler-auditor-httpd_get-monitoring-denominations-without-sigs.c @@ -48,10 +48,12 @@ process_denominations_without_sigs ( &dc->denompub_h), TALER_JSON_pack_amount ("value", &dc->value), - TALER_JSON_pack_time_abs_human ("start_time", - dc->start_time), - TALER_JSON_pack_time_abs_human ("end_time", - dc->end_time), + GNUNET_JSON_pack_timestamp ("start_time", + GNUNET_TIME_absolute_to_timestamp ( + dc->start_time)), + GNUNET_JSON_pack_timestamp ("end_time", + GNUNET_TIME_absolute_to_timestamp ( + dc->end_time)), GNUNET_JSON_pack_bool ("suppressed", dc->suppressed) ); @@ -91,15 +93,15 @@ TAH_get_monitoring_denominations_without_sigs ( NULL); } TAH_PARSE_REQUEST_LIMIT (connection, - "limit", - &limit); + "limit", + &limit); if (limit < 0) offset = TAH_SAFE_UINT64_MAX; else offset = 0; TAH_PARSE_SAFE_REQUEST_NUMBER (connection, - "offset", - &offset); + "offset", + &offset); { const char *ret_s = MHD_lookup_connection_value (connection, MHD_GET_ARGUMENT_KIND, diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-emergency-by-count.c b/src/auditor/taler-auditor-httpd_get-monitoring-emergency-by-count.c @@ -51,10 +51,12 @@ process_emergency_by_count ( dc->num_known), TALER_JSON_pack_amount ("risk", &dc->risk), - TALER_JSON_pack_time_abs_human ("start", - dc->start), - TALER_JSON_pack_time_abs_human ("deposit_end", - dc->deposit_end), + GNUNET_JSON_pack_timestamp ("start", + GNUNET_TIME_absolute_to_timestamp ( + dc->start)), + GNUNET_JSON_pack_timestamp ("deposit_end", + GNUNET_TIME_absolute_to_timestamp ( + dc->deposit_end)), TALER_JSON_pack_amount ("value", &dc->value), GNUNET_JSON_pack_bool ("suppressed", @@ -96,15 +98,15 @@ TAH_get_monitoring_emergency_by_count ( NULL); } TAH_PARSE_REQUEST_LIMIT (connection, - "limit", - &limit); + "limit", + &limit); if (limit < 0) offset = TAH_SAFE_UINT64_MAX; else offset = 0; TAH_PARSE_SAFE_REQUEST_NUMBER (connection, - "offset", - &offset); + "offset", + &offset); { const char *ret_s = MHD_lookup_connection_value (connection, diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-emergency.c b/src/auditor/taler-auditor-httpd_get-monitoring-emergency.c @@ -50,10 +50,12 @@ process_emergency ( &dc->denom_risk), TALER_JSON_pack_amount ("denom_loss", &dc->denom_loss), - TALER_JSON_pack_time_abs_human ("deposit_start", - dc->deposit_start), - TALER_JSON_pack_time_abs_human ("deposit_end", - dc->deposit_end), + GNUNET_JSON_pack_timestamp ("deposit_start", + GNUNET_TIME_absolute_to_timestamp ( + dc->deposit_start)), + GNUNET_JSON_pack_timestamp ("deposit_end", + GNUNET_TIME_absolute_to_timestamp ( + dc->deposit_end)), TALER_JSON_pack_amount ("value", &dc->value), GNUNET_JSON_pack_bool ("suppressed", @@ -95,15 +97,15 @@ TAH_get_monitoring_emergency ( NULL); } TAH_PARSE_REQUEST_LIMIT (connection, - "limit", - &limit); + "limit", + &limit); if (limit < 0) offset = TAH_SAFE_UINT64_MAX; else offset = 0; TAH_PARSE_SAFE_REQUEST_NUMBER (connection, - "offset", - &offset); + "offset", + &offset); { const char *ret_s = MHD_lookup_connection_value (connection, diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-fee-time-inconsistency.c b/src/auditor/taler-auditor-httpd_get-monitoring-fee-time-inconsistency.c @@ -48,8 +48,9 @@ process_fee_time_inconsistency ( dc->problem_row_id), GNUNET_JSON_pack_string ("type", dc->type), - TALER_JSON_pack_time_abs_human ("time", - dc->time), + GNUNET_JSON_pack_timestamp ("time", + GNUNET_TIME_absolute_to_timestamp ( + dc->time)), GNUNET_JSON_pack_string ("diagnostic", dc->diagnostic), GNUNET_JSON_pack_bool ("suppressed", @@ -91,15 +92,15 @@ TAH_get_monitoring_fee_time_inconsistency ( NULL); } TAH_PARSE_REQUEST_LIMIT (connection, - "limit", - &limit); + "limit", + &limit); if (limit < 0) offset = TAH_SAFE_UINT64_MAX; else offset = 0; TAH_PARSE_SAFE_REQUEST_NUMBER (connection, - "offset", - &offset); + "offset", + &offset); { const char *ret_s = MHD_lookup_connection_value (connection, diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-historic-denomination-revenue.c b/src/auditor/taler-auditor-httpd_get-monitoring-historic-denomination-revenue.c @@ -56,8 +56,8 @@ process_historic_denomination_revenue ( serial_id), GNUNET_JSON_pack_data_auto ("h_denom_pub", denom_pub_hash), - TALER_JSON_pack_time_abs_human ("revenue_timestamp", - revenue_timestamp.abs_time), + GNUNET_JSON_pack_timestamp ("revenue_timestamp", + revenue_timestamp), TALER_JSON_pack_amount ("revenue_balance", revenue_balance), TALER_JSON_pack_amount ("loss_balance", @@ -101,15 +101,15 @@ TAH_get_monitoring_historic_denomination_revenue ( NULL); } TAH_PARSE_REQUEST_LIMIT (connection, - "limit", - &limit); + "limit", + &limit); if (limit < 0) offset = TAH_SAFE_UINT64_MAX; else offset = 0; TAH_PARSE_SAFE_REQUEST_NUMBER (connection, - "offset", - &offset); + "offset", + &offset); ja = json_array (); GNUNET_break (NULL != ja); qs = TALER_AUDITORDB_iterate_historic_denom_revenue ( diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-historic-reserve-summary.c b/src/auditor/taler-auditor-httpd_get-monitoring-historic-reserve-summary.c @@ -52,10 +52,10 @@ process_historic_reserve_summary ( obj = GNUNET_JSON_PACK ( GNUNET_JSON_pack_int64 ("row_id", serial_id), - TALER_JSON_pack_time_abs_human ("start_date", - start_time.abs_time), - TALER_JSON_pack_time_abs_human ("end_date", - end_time.abs_time), + GNUNET_JSON_pack_timestamp ("start_date", + start_time), + GNUNET_JSON_pack_timestamp ("end_date", + end_time), TALER_JSON_pack_amount ("reserve_profits", reserve_profits) ); @@ -95,15 +95,15 @@ TAH_get_monitoring_historic_reserve_summary ( NULL); } TAH_PARSE_REQUEST_LIMIT (connection, - "limit", - &limit); + "limit", + &limit); if (limit < 0) offset = TAH_SAFE_UINT64_MAX; else offset = 0; TAH_PARSE_SAFE_REQUEST_NUMBER (connection, - "offset", - &offset); + "offset", + &offset); ja = json_array (); GNUNET_break (NULL != ja); qs = TALER_AUDITORDB_iterate_historic_reserve_revenue ( diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-kycauth-in-inconsistency.c b/src/auditor/taler-auditor-httpd_get-monitoring-kycauth-in-inconsistency.c @@ -57,8 +57,9 @@ process_kycauth_in_inconsistency ( &dc->amount_wired), GNUNET_JSON_pack_data_auto ("account_pub", &dc->account_pub), - TALER_JSON_pack_time_abs_human ("timestamp", - dc->timestamp), + GNUNET_JSON_pack_timestamp ("timestamp", + GNUNET_TIME_absolute_to_timestamp ( + dc->timestamp)), TALER_JSON_pack_full_payto ("account", dc->account), GNUNET_JSON_pack_string ("diagnostic", @@ -102,15 +103,15 @@ TAH_get_monitoring_kycauth_in_inconsistency ( NULL); } TAH_PARSE_REQUEST_LIMIT (connection, - "limit", - &limit); + "limit", + &limit); if (limit < 0) offset = TAH_SAFE_UINT64_MAX; else offset = 0; TAH_PARSE_SAFE_REQUEST_NUMBER (connection, - "offset", - &offset); + "offset", + &offset); { const char *ret_s = MHD_lookup_connection_value (connection, diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-purse-not-closed-inconsistencies.c b/src/auditor/taler-auditor-httpd_get-monitoring-purse-not-closed-inconsistencies.c @@ -47,8 +47,9 @@ process_purse_not_closed_inconsistencies ( &dc->purse_pub), TALER_JSON_pack_amount ("amount", &dc->amount), - TALER_JSON_pack_time_abs_human ("expiration_date", - dc->expiration_date), + GNUNET_JSON_pack_timestamp ("expiration_date", + GNUNET_TIME_absolute_to_timestamp ( + dc->expiration_date)), GNUNET_JSON_pack_bool ("suppressed", dc->suppressed) ); @@ -88,15 +89,15 @@ TAH_get_monitoring_purse_not_closed_inconsistencies ( NULL); } TAH_PARSE_REQUEST_LIMIT (connection, - "limit", - &limit); + "limit", + &limit); if (limit < 0) offset = TAH_SAFE_UINT64_MAX; else offset = 0; TAH_PARSE_SAFE_REQUEST_NUMBER (connection, - "offset", - &offset); + "offset", + &offset); { const char *ret_s diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-purses.c b/src/auditor/taler-auditor-httpd_get-monitoring-purses.c @@ -50,7 +50,9 @@ process_purses ( GNUNET_JSON_pack_data_auto ("purse_pub", &dc->purse_pub), TALER_JSON_pack_amount ("balance", &dc->balance), TALER_JSON_pack_amount ("target", &dc->target), - TALER_JSON_pack_time_abs_human ("expiration_date", dc->expiration_date) + GNUNET_JSON_pack_timestamp ("expiration_date", + GNUNET_TIME_absolute_to_timestamp ( + dc->expiration_date)) ); @@ -92,15 +94,15 @@ TAH_get_monitoring_purses ( NULL); } TAH_PARSE_REQUEST_LIMIT (connection, - "limit", - &limit); + "limit", + &limit); if (limit < 0) offset = TAH_SAFE_UINT64_MAX; else offset = 0; TAH_PARSE_SAFE_REQUEST_NUMBER (connection, - "offset", - &offset); + "offset", + &offset); ja = json_array (); GNUNET_break (NULL != ja); qs = TALER_AUDITORDB_iterate_purses ( diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-reserve-in-inconsistency.c b/src/auditor/taler-auditor-httpd_get-monitoring-reserve-in-inconsistency.c @@ -52,8 +52,9 @@ process_reserve_in_inconsistency ( &dc->amount_wired), GNUNET_JSON_pack_data_auto ("reserve_pub", &dc->reserve_pub), - TALER_JSON_pack_time_abs_human ("timestamp", - dc->timestamp), + GNUNET_JSON_pack_timestamp ("timestamp", + GNUNET_TIME_absolute_to_timestamp ( + dc->timestamp)), TALER_JSON_pack_full_payto ("account", dc->account), GNUNET_JSON_pack_string ("diagnostic", @@ -99,15 +100,15 @@ TAH_get_monitoring_reserve_in_inconsistency ( NULL); } TAH_PARSE_REQUEST_LIMIT (connection, - "limit", - &limit); + "limit", + &limit); if (limit < 0) offset = TAH_SAFE_UINT64_MAX; else offset = 0; TAH_PARSE_SAFE_REQUEST_NUMBER (connection, - "offset", - &offset); + "offset", + &offset); { const char *ret_s = MHD_lookup_connection_value (connection, diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-reserve-not-closed-inconsistency.c b/src/auditor/taler-auditor-httpd_get-monitoring-reserve-not-closed-inconsistency.c @@ -48,8 +48,9 @@ process_reserve_not_closed_inconsistency ( &dc->reserve_pub), TALER_JSON_pack_amount ("balance", &dc->balance), - TALER_JSON_pack_time_abs_human ("expiration_time", - dc->expiration_time), + GNUNET_JSON_pack_timestamp ("expiration_time", + GNUNET_TIME_absolute_to_timestamp ( + dc->expiration_time)), GNUNET_JSON_pack_allow_null ( GNUNET_JSON_pack_string ("diagnostic", dc->diagnostic)), @@ -92,15 +93,15 @@ TAH_get_monitoring_reserve_not_closed_inconsistency ( NULL); } TAH_PARSE_REQUEST_LIMIT (connection, - "limit", - &limit); + "limit", + &limit); if (limit < 0) offset = TAH_SAFE_UINT64_MAX; else offset = 0; TAH_PARSE_SAFE_REQUEST_NUMBER (connection, - "offset", - &offset); + "offset", + &offset); { const char *ret_s = MHD_lookup_connection_value (connection, diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-reserves.c b/src/auditor/taler-auditor-httpd_get-monitoring-reserves.c @@ -62,8 +62,9 @@ process_reserves ( &dc->open_fee_balance), TALER_JSON_pack_amount ("history_fee_balance", &dc->history_fee_balance), - TALER_JSON_pack_time_abs_human ("expiration_date", - dc->expiration_date), + GNUNET_JSON_pack_timestamp ("expiration_date", + GNUNET_TIME_absolute_to_timestamp ( + dc->expiration_date)), GNUNET_JSON_pack_allow_null ( TALER_JSON_pack_full_payto ("origin_account", dc->origin_account)) @@ -103,16 +104,16 @@ TAH_get_monitoring_reserves ( NULL); } TAH_PARSE_REQUEST_LIMIT (connection, - "limit", - &limit); + "limit", + &limit); if (limit < 0) offset = TAH_SAFE_UINT64_MAX; else offset = 0; TAH_PARSE_SAFE_REQUEST_NUMBER (connection, - "offset", - &offset); + "offset", + &offset); ja = json_array (); GNUNET_break (NULL != ja); qs = TALER_AUDITORDB_iterate_reserves (