[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated: add reserve-open-deposit transac
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated: add reserve-open-deposit transactions to coin histories |
Date: |
Fri, 14 Oct 2022 00:30:55 +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 5f333f81 add reserve-open-deposit transactions to coin histories
5f333f81 is described below
commit 5f333f817c0fe4d66d1223833f8b8f7f22ad174c
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Fri Oct 14 00:29:32 2022 +0200
add reserve-open-deposit transactions to coin histories
---
src/auditor/taler-auditor-sync.c | 1 -
src/exchange/taler-exchange-httpd_responses.c | 25 +++++++++++++++++++++++++
src/exchangedb/exchangedb_transactions.c | 11 +++++++++++
src/exchangedb/plugin_exchangedb_common.c | 8 ++++++++
4 files changed, 44 insertions(+), 1 deletion(-)
diff --git a/src/auditor/taler-auditor-sync.c b/src/auditor/taler-auditor-sync.c
index 9666ec33..16ace8fa 100644
--- a/src/auditor/taler-auditor-sync.c
+++ b/src/auditor/taler-auditor-sync.c
@@ -99,7 +99,6 @@ static struct Table tables[] = {
{ .rt = TALER_EXCHANGEDB_RT_RESERVES_CLOSE},
{ .rt = TALER_EXCHANGEDB_RT_RESERVES_OPEN_REQUESTS},
{ .rt = TALER_EXCHANGEDB_RT_RESERVES_OPEN_DEPOSITS},
- { .rt = TALER_EXCHANGEDB_RT_RESERVES_CLOSE_REQUESTS},
{ .rt = TALER_EXCHANGEDB_RT_RESERVES_OUT},
{ .rt = TALER_EXCHANGEDB_RT_AUDITORS},
{ .rt = TALER_EXCHANGEDB_RT_AUDITOR_DENOM_SIGS},
diff --git a/src/exchange/taler-exchange-httpd_responses.c
b/src/exchange/taler-exchange-httpd_responses.c
index 516b3646..77f01de6 100644
--- a/src/exchange/taler-exchange-httpd_responses.c
+++ b/src/exchange/taler-exchange-httpd_responses.c
@@ -424,6 +424,31 @@ TEH_RESPONSE_compile_transaction_history (
}
break;
}
+
+ case TALER_EXCHANGEDB_TT_RESERVE_OPEN:
+ {
+ struct TALER_EXCHANGEDB_ReserveOpenListEntry *role
+ = pos->details.reserve_open;
+
+ if (0 !=
+ json_array_append_new (
+ history,
+ GNUNET_JSON_PACK (
+ GNUNET_JSON_pack_string ("type",
+ "RESERVE-OPEN-DEPOSIT"),
+ TALER_JSON_pack_amount ("coin_contribution",
+ &role->coin_contribution),
+ GNUNET_JSON_pack_data_auto ("reserve_sig",
+ &role->reserve_sig),
+ GNUNET_JSON_pack_data_auto ("coin_sig",
+ &role->coin_sig))))
+ {
+ GNUNET_break (0);
+ json_decref (history);
+ return NULL;
+ }
+ break;
+ }
}
}
return history;
diff --git a/src/exchangedb/exchangedb_transactions.c
b/src/exchangedb/exchangedb_transactions.c
index ef46bace..60b95d6f 100644
--- a/src/exchangedb/exchangedb_transactions.c
+++ b/src/exchangedb/exchangedb_transactions.c
@@ -131,6 +131,17 @@ TALER_EXCHANGEDB_calculate_transaction_list_totals (
}
deposit_fee = pos->details.purse_deposit->deposit_fee;
break;
+ case TALER_EXCHANGEDB_TT_RESERVE_OPEN:
+ /* spent += pos->amount_with_fee */
+ if (0 >
+ TALER_amount_add (&spent,
+ &spent,
+ &pos->details.reserve_open->coin_contribution))
+ {
+ GNUNET_break (0);
+ return GNUNET_SYSERR;
+ }
+ break;
}
}
if (have_refund)
diff --git a/src/exchangedb/plugin_exchangedb_common.c
b/src/exchangedb/plugin_exchangedb_common.c
index 10263adf..84198ddd 100644
--- a/src/exchangedb/plugin_exchangedb_common.c
+++ b/src/exchangedb/plugin_exchangedb_common.c
@@ -152,6 +152,14 @@ TEH_COMMON_free_coin_transaction_list (
GNUNET_free (deposit);
break;
}
+ case TALER_EXCHANGEDB_TT_RESERVE_OPEN:
+ {
+ struct TALER_EXCHANGEDB_ReserveOpenListEntry *role;
+
+ role = tl->details.reserve_open;
+ GNUNET_free (role);
+ break;
+ }
}
{
struct TALER_EXCHANGEDB_TransactionList *next;
--
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: add reserve-open-deposit transactions to coin histories,
gnunet <=