aboutsummaryrefslogtreecommitdiff
path: root/src/auditor
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-09-17 11:27:33 +0200
committerChristian Grothoff <christian@grothoff.org>2023-09-17 11:27:33 +0200
commit9ae46f367e606f9b3866b361459e05a71be9f310 (patch)
tree8ebc0edf84cc745a75b9c8ff4b550a40a08c9ca8 /src/auditor
parent535c57b2f9660e4178b31e2a0c47444b00348b71 (diff)
first cut for API to get coin history
Diffstat (limited to 'src/auditor')
-rw-r--r--src/auditor/taler-helper-auditor-aggregation.c5
-rw-r--r--src/auditor/taler-helper-auditor-coins.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/src/auditor/taler-helper-auditor-aggregation.c b/src/auditor/taler-helper-auditor-aggregation.c
index 72498ee07..81892c16c 100644
--- a/src/auditor/taler-helper-auditor-aggregation.c
+++ b/src/auditor/taler-helper-auditor-aggregation.c
@@ -767,6 +767,7 @@ wire_transfer_information_cb (
struct TALER_CoinPublicInfo coin;
enum GNUNET_DB_QueryStatus qs;
struct TALER_PaytoHashP hpt;
+ uint64_t etag = 0;
TALER_payto_hash (account_pay_uri,
&hpt);
@@ -779,8 +780,12 @@ wire_transfer_information_cb (
"h-payto does not match payto URI");
}
/* Obtain coin's transaction history */
+ /* TODO: could use 'etag' mechanism to only fetch transactions
+ we did not yet process, instead of going over them
+ again and again.*/
qs = TALER_ARL_edb->get_coin_transactions (TALER_ARL_edb->cls,
coin_pub,
+ &etag,
&tl);
if ( (qs < 0) ||
(NULL == tl) )
diff --git a/src/auditor/taler-helper-auditor-coins.c b/src/auditor/taler-helper-auditor-coins.c
index bfdc11c7e..8c3d66b98 100644
--- a/src/auditor/taler-helper-auditor-coins.c
+++ b/src/auditor/taler-helper-auditor-coins.c
@@ -435,9 +435,14 @@ check_coin_history (const struct TALER_CoinSpendPublicKeyP *coin_pub,
struct TALER_Amount refunded;
struct TALER_Amount deposit_fee;
bool have_refund;
+ uint64_t etag = 0;
+ /* TODO: could use 'etag' mechanism to only fetch transactions
+ we did not yet process, instead of going over them
+ again and again. */
qs = TALER_ARL_edb->get_coin_transactions (TALER_ARL_edb->cls,
coin_pub,
+ &etag,
&tl);
if (0 >= qs)
return qs;