exchange

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

commit 9197bd92f89e11cc137df0b8b841fc157c710fa6
parent 85a803d6ba73c349686561b124eafabe97cb8824
Author: Christian Grothoff <christian@grothoff.org>
Date:   Wed, 15 Apr 2026 22:00:24 +0200

comment on some FIXMEs

Diffstat:
Msrc/exchange/taler-exchange-httpd_post-melt.c | 18++++++++----------
Msrc/exchange/taler-exchange-router.c | 4+++-
Msrc/exchangedb/begin_revolving_shard.c | 14+++++++-------
Msrc/exchangedb/lookup_records_by_table.c | 6+++---
Msrc/include/taler/exchange/post-purses-PURSE_PUB-deposit.h | 4++--
Msrc/include/taler/exchange/post-reserves-RESERVE_PUB-purse.h | 2+-
Msrc/lib/exchange_api_post-purses-PURSE_PUB-deposit.c | 4++--
Msrc/lib/exchange_api_post-reserves-RESERVE_PUB-purse.c | 2+-
8 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/src/exchange/taler-exchange-httpd_post-melt.c b/src/exchange/taler-exchange-httpd_post-melt.c @@ -1317,13 +1317,11 @@ melt_is_idempotent ( &mc->request.refresh_idem); if (0 > qs) { - /* FIXME: soft error not handled correctly! */ - GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs); - if (GNUNET_DB_STATUS_HARD_ERROR == qs) - SET_ERROR_WITH_DETAIL (mc, - MELT_ERROR_DB_FETCH_FAILED, - db_fetch_context, - "get_refresh"); + GNUNET_break (0); + SET_ERROR_WITH_DETAIL (mc, + MELT_ERROR_DB_FETCH_FAILED, + db_fetch_context, + "get_refresh"); return true; /* Well, kind-of. */ } if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs) @@ -1575,7 +1573,7 @@ phase_generate_reply_error ( TALER_MHD_reply_with_error ( mc->rc->connection, MHD_HTTP_BAD_REQUEST, - TALER_EC_GENERIC_PARAMETER_MALFORMED, /* FIXME: new error! */ + TALER_EC_GENERIC_PARAMETER_MALFORMED, "duplicate planchet")); return; case MELT_ERROR_DUPLICATE_TRANSFER_PUB: @@ -1583,7 +1581,7 @@ phase_generate_reply_error ( TALER_MHD_reply_with_error ( mc->rc->connection, MHD_HTTP_BAD_REQUEST, - TALER_EC_GENERIC_PARAMETER_MALFORMED, /* FIXME: new error! */ + TALER_EC_GENERIC_PARAMETER_MALFORMED, "duplicate transfer_pub")); return; case MELT_ERROR_NONCE_RESUSE: @@ -1591,7 +1589,7 @@ phase_generate_reply_error ( TALER_MHD_reply_with_error ( mc->rc->connection, MHD_HTTP_BAD_REQUEST, - TALER_EC_GENERIC_PARAMETER_MALFORMED, /* FIXME: new error */ + TALER_EC_GENERIC_PARAMETER_MALFORMED, "nonce reuse")); return; case MELT_ERROR_COIN_SIGNATURE_INVALID: diff --git a/src/exchange/taler-exchange-router.c b/src/exchange/taler-exchange-router.c @@ -30,7 +30,7 @@ #include "taler/taler_json_lib.h" #include "taler/taler_bank_service.h" #include "exchange-database/release_revolving_shard.h" -// FIXME: weird to have commit but not start? +#include "exchange-database/start.h" #include "exchange-database/commit.h" #include "exchange-database/preflight.h" #include "exchange-database/begin_revolving_shard.h" @@ -288,6 +288,8 @@ run_routing (void *cls) task = NULL; GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Checking for ready P2P transfers to route\n"); + (void) TALER_EXCHANGEDB_start (pg, + "taler-exchange-router: main"); // FIXME #7271: do actual work here! commit_or_warn (); release_shard (s); diff --git a/src/exchangedb/begin_revolving_shard.c b/src/exchangedb/begin_revolving_shard.c @@ -26,13 +26,13 @@ #include "exchange-database/rollback.h" enum GNUNET_DB_QueryStatus -TALER_EXCHANGEDB_begin_revolving_shard (struct - TALER_EXCHANGEDB_PostgresContext *pg, - const char *job_name, - uint32_t shard_size, - uint32_t shard_limit, - uint32_t *start_row, - uint32_t *end_row) +TALER_EXCHANGEDB_begin_revolving_shard ( + struct TALER_EXCHANGEDB_PostgresContext *pg, + const char *job_name, + uint32_t shard_size, + uint32_t shard_limit, + uint32_t *start_row, + uint32_t *end_row) { GNUNET_assert (shard_limit <= 1U + (uint32_t) INT_MAX); diff --git a/src/exchangedb/lookup_records_by_table.c b/src/exchangedb/lookup_records_by_table.c @@ -3443,17 +3443,17 @@ TALER_EXCHANGEDB_lookup_records_by_table ( rh = &lrbt_cb_table_recoup_refresh; break; case TALER_EXCHANGEDB_RT_EXTENSIONS: - // FIXME: this seems broken! -- where is the SQL!? + // FIXME[oec]: this seems broken! -- where is the SQL!? statement = "select_above_serial_by_table_extensions"; rh = &lrbt_cb_table_extensions; break; case TALER_EXCHANGEDB_RT_POLICY_DETAILS: - // FIXME: this seems broken! -- where is the SQL!? + // FIXME[oec]: this seems broken! -- where is the SQL!? statement = "select_above_serial_by_table_policy_details"; rh = &lrbt_cb_table_policy_details; break; case TALER_EXCHANGEDB_RT_POLICY_FULFILLMENTS: - // FIXME: this seems broken! -- where is the SQL!? + // FIXME[oec]: this seems broken! -- where is the SQL!? statement = "select_above_serial_by_table_policy_fulfillments"; rh = &lrbt_cb_table_policy_fulfillments; break; diff --git a/src/include/taler/exchange/post-purses-PURSE_PUB-deposit.h b/src/include/taler/exchange/post-purses-PURSE_PUB-deposit.h @@ -48,9 +48,9 @@ TALER_EXCHANGE_post_purses_deposit_create ( struct GNUNET_CURL_Context *ctx, const char *url, struct TALER_EXCHANGE_Keys *keys, - const char *purse_exchange_url, + const char *purse_exchange_url, // FIXME: turn into option const struct TALER_PurseContractPublicKeyP *purse_pub, - uint8_t min_age, + uint8_t min_age, // FIXME: turn into option unsigned int num_deposits, const struct TALER_EXCHANGE_PurseDeposit deposits[static num_deposits]); diff --git a/src/include/taler/exchange/post-reserves-RESERVE_PUB-purse.h b/src/include/taler/exchange/post-reserves-RESERVE_PUB-purse.h @@ -95,7 +95,7 @@ TALER_EXCHANGE_post_reserves_purse_create ( const struct TALER_PurseMergePrivateKeyP *merge_priv, const struct TALER_ContractDiffiePrivateP *contract_priv, const json_t *contract_terms, - bool pay_for_purse, + bool pay_for_purse, // FIXME: turn into option (default: false) struct GNUNET_TIME_Timestamp merge_timestamp); diff --git a/src/lib/exchange_api_post-purses-PURSE_PUB-deposit.c b/src/lib/exchange_api_post-purses-PURSE_PUB-deposit.c @@ -352,9 +352,9 @@ TALER_EXCHANGE_post_purses_deposit_create ( struct GNUNET_CURL_Context *ctx, const char *url, struct TALER_EXCHANGE_Keys *keys, - const char *purse_exchange_url, + const char *purse_exchange_url, // FIXME: turn into option! const struct TALER_PurseContractPublicKeyP *purse_pub, - uint8_t min_age, + uint8_t min_age, // FIXME: turn into option! unsigned int num_deposits, const struct TALER_EXCHANGE_PurseDeposit deposits[static num_deposits]) { diff --git a/src/lib/exchange_api_post-reserves-RESERVE_PUB-purse.c b/src/lib/exchange_api_post-reserves-RESERVE_PUB-purse.c @@ -392,7 +392,7 @@ TALER_EXCHANGE_post_reserves_purse_create ( const struct TALER_ContractDiffiePrivateP *contract_priv, const json_t *contract_terms, bool pay_for_purse, // FIXME: turn into option? - struct GNUNET_TIME_Timestamp merge_timestamp) // FIXME: turn into option? + struct GNUNET_TIME_Timestamp merge_timestamp) { struct TALER_EXCHANGE_PostReservesPurseHandle *prph;