[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated: -fix auditor FTBFS
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated: -fix auditor FTBFS |
Date: |
Tue, 20 Aug 2024 22:06:14 +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 8ee82f195 -fix auditor FTBFS
8ee82f195 is described below
commit 8ee82f195d4b99baec27537d9942e0ef73ac9aab
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Tue Aug 20 22:06:11 2024 +0200
-fix auditor FTBFS
---
src/auditordb/pg_select_historic_denom_revenue.c | 10 +++++++++-
src/auditordb/pg_select_historic_denom_revenue.h | 2 ++
src/auditordb/pg_select_historic_reserve_revenue.c | 10 +++++++++-
src/auditordb/pg_select_historic_reserve_revenue.h | 2 ++
4 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/src/auditordb/pg_select_historic_denom_revenue.c
b/src/auditordb/pg_select_historic_denom_revenue.c
index aa44625e7..e89841df0 100644
--- a/src/auditordb/pg_select_historic_denom_revenue.c
+++ b/src/auditordb/pg_select_historic_denom_revenue.c
@@ -72,11 +72,14 @@ historic_denom_revenue_cb (void *cls,
for (unsigned int i = 0; i < num_results; i++)
{
+ uint64_t rowid;
struct TALER_DenominationHashP denom_pub_hash;
struct GNUNET_TIME_Timestamp revenue_timestamp;
struct TALER_Amount revenue_balance;
struct TALER_Amount loss;
struct GNUNET_PQ_ResultSpec rs[] = {
+ GNUNET_PQ_result_spec_uint64 ("row_id",
+ &rowid),
GNUNET_PQ_result_spec_auto_from_type ("denom_pub_hash",
&denom_pub_hash),
GNUNET_PQ_result_spec_timestamp ("revenue_timestamp",
@@ -101,6 +104,7 @@ historic_denom_revenue_cb (void *cls,
hrc->qs = i + 1;
if (GNUNET_OK !=
hrc->cb (hrc->cb_cls,
+ rowid,
&denom_pub_hash,
revenue_timestamp,
&revenue_balance,
@@ -113,6 +117,8 @@ historic_denom_revenue_cb (void *cls,
enum GNUNET_DB_QueryStatus
TAH_PG_select_historic_denom_revenue (
void *cls,
+ int64_t limit,
+ uint64_t offset,
TALER_AUDITORDB_HistoricDenominationRevenueDataCallback cb,
void *cb_cls)
{
@@ -127,10 +133,12 @@ TAH_PG_select_historic_denom_revenue (
};
enum GNUNET_DB_QueryStatus qs;
+ // FIXME: implement limit/offset!
PREPARE (pg,
"auditor_historic_denomination_revenue_select",
"SELECT"
- " denom_pub_hash"
+ " row_id"
+ ",denom_pub_hash"
",revenue_timestamp"
",revenue_balance"
",loss_balance"
diff --git a/src/auditordb/pg_select_historic_denom_revenue.h
b/src/auditordb/pg_select_historic_denom_revenue.h
index 25a68dacb..621c7d38d 100644
--- a/src/auditordb/pg_select_historic_denom_revenue.h
+++ b/src/auditordb/pg_select_historic_denom_revenue.h
@@ -37,6 +37,8 @@
enum GNUNET_DB_QueryStatus
TAH_PG_select_historic_denom_revenue (
void *cls,
+ int64_t limit,
+ uint64_t offset,
TALER_AUDITORDB_HistoricDenominationRevenueDataCallback cb,
void *cb_cls);
diff --git a/src/auditordb/pg_select_historic_reserve_revenue.c
b/src/auditordb/pg_select_historic_reserve_revenue.c
index 877c3e2d7..d3366529e 100644
--- a/src/auditordb/pg_select_historic_reserve_revenue.c
+++ b/src/auditordb/pg_select_historic_reserve_revenue.c
@@ -72,10 +72,13 @@ historic_reserve_revenue_cb (void *cls,
for (unsigned int i = 0; i < num_results; i++)
{
+ uint64_t rowid;
struct GNUNET_TIME_Timestamp start_date;
struct GNUNET_TIME_Timestamp end_date;
struct TALER_Amount reserve_profits;
struct GNUNET_PQ_ResultSpec rs[] = {
+ GNUNET_PQ_result_spec_uint64 ("row_id",
+ &rowid),
GNUNET_PQ_result_spec_timestamp ("start_date",
&start_date),
GNUNET_PQ_result_spec_timestamp ("end_date",
@@ -97,6 +100,7 @@ historic_reserve_revenue_cb (void *cls,
hrc->qs = i + 1;
if (GNUNET_OK !=
hrc->cb (hrc->cb_cls,
+ rowid,
start_date,
end_date,
&reserve_profits))
@@ -108,6 +112,8 @@ historic_reserve_revenue_cb (void *cls,
enum GNUNET_DB_QueryStatus
TAH_PG_select_historic_reserve_revenue (
void *cls,
+ int64_t limit,
+ uint64_t offset,
TALER_AUDITORDB_HistoricReserveRevenueDataCallback cb,
void *cb_cls)
{
@@ -122,10 +128,12 @@ TAH_PG_select_historic_reserve_revenue (
.pg = pg
};
+ // FIXME: use limit/offset!
PREPARE (pg,
"auditor_historic_reserve_summary_select",
"SELECT"
- " start_date"
+ " row_id"
+ ",start_date"
",end_date"
",reserve_profits"
" FROM auditor_historic_reserve_summary");
diff --git a/src/auditordb/pg_select_historic_reserve_revenue.h
b/src/auditordb/pg_select_historic_reserve_revenue.h
index b067c8917..e9190e35b 100644
--- a/src/auditordb/pg_select_historic_reserve_revenue.h
+++ b/src/auditordb/pg_select_historic_reserve_revenue.h
@@ -36,6 +36,8 @@
enum GNUNET_DB_QueryStatus
TAH_PG_select_historic_reserve_revenue (
void *cls,
+ int64_t limit,
+ uint64_t offset,
TALER_AUDITORDB_HistoricReserveRevenueDataCallback cb,
void *cb_cls);
--
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: -fix auditor FTBFS,
gnunet <=