[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated: -address FIXME
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated: -address FIXME |
Date: |
Sun, 15 Oct 2023 21:58:53 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
The following commit(s) were added to refs/heads/master by this push:
new c72cf2ce -address FIXME
c72cf2ce is described below
commit c72cf2ce10017dccc342c4ea86ac2b006aa54149
Author: Christian Grothoff <grothoff@gnunet.org>
AuthorDate: Sun Oct 15 21:58:48 2023 +0200
-address FIXME
---
src/exchange/taler-exchange-httpd_management_partners.c | 2 +-
src/exchangedb/pg_aggregate.c | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/exchange/taler-exchange-httpd_management_partners.c
b/src/exchange/taler-exchange-httpd_management_partners.c
index c63192c6..e336d24e 100644
--- a/src/exchange/taler-exchange-httpd_management_partners.c
+++ b/src/exchange/taler-exchange-httpd_management_partners.c
@@ -113,7 +113,7 @@ TEH_handler_management_partners (
}
if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs)
{
- /* FIXME: check for idempotency! */
+ /* FIXME-#7271: check for idempotency! */
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_CONFLICT,
TALER_EC_EXCHANGE_MANAGEMENT_ADD_PARTNER_DATA_CONFLICT,
diff --git a/src/exchangedb/pg_aggregate.c b/src/exchangedb/pg_aggregate.c
index 6f143e94..16805d75 100644
--- a/src/exchangedb/pg_aggregate.c
+++ b/src/exchangedb/pg_aggregate.c
@@ -22,10 +22,12 @@
#include "taler_error_codes.h"
#include "taler_dbevents.h"
#include "taler_pq_lib.h"
+#include "pg_compute_shard.h"
#include "pg_event_notify.h"
#include "pg_aggregate.h"
#include "pg_helper.h"
+
enum GNUNET_DB_QueryStatus
TEH_PG_aggregate (
void *cls,
@@ -35,6 +37,7 @@ TEH_PG_aggregate (
struct TALER_Amount *total)
{
struct PostgresClosure *pg = cls;
+ uint64_t deposit_shard = TEH_PG_compute_shard (merchant_pub);
struct GNUNET_TIME_Absolute now = {0};
uint64_t sum_deposit_value;
uint64_t sum_deposit_frac;
@@ -57,7 +60,7 @@ TEH_PG_aggregate (
" SET done=TRUE"
" WHERE NOT (done OR policy_blocked)" /* only actually executable
deposits */
" AND refund_deadline<$1"
- /* FIXME: maybe more efficient to add shard here, too? */
+ " AND shard=$5" /* only for efficiency, merchant_pub is what we
really filter by */
" AND merchant_pub=$2" /* filter by target merchant */
" AND wire_target_h_payto=$3" /* merchant could have a 2nd bank
account */
" RETURNING"
@@ -135,6 +138,7 @@ TEH_PG_aggregate (
GNUNET_PQ_query_param_auto_from_type (merchant_pub),
GNUNET_PQ_query_param_auto_from_type (h_payto),
GNUNET_PQ_query_param_auto_from_type (wtid),
+ GNUNET_PQ_query_param_uint64 (&deposit_shard),
GNUNET_PQ_query_param_end
};
struct GNUNET_PQ_ResultSpec rs[] = {
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-exchange] branch master updated: -address FIXME,
gnunet <=