aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
m---------contrib/gana0
-rw-r--r--src/exchange/Makefile.am1
-rw-r--r--src/exchange/taler-exchange-httpd_metrics.h3
-rw-r--r--src/exchange/taler-exchange-httpd_purses_deposit.c18
4 files changed, 18 insertions, 4 deletions
diff --git a/contrib/gana b/contrib/gana
-Subproject 138acf20b87d796543e9eaa68f98e5e8ae2e730
+Subproject c2580e60259ba3aea2e69ea9da43482008b90d7
diff --git a/src/exchange/Makefile.am b/src/exchange/Makefile.am
index 0fbdb8e80..b698753c0 100644
--- a/src/exchange/Makefile.am
+++ b/src/exchange/Makefile.am
@@ -105,6 +105,7 @@ taler_exchange_httpd_SOURCES = \
taler-exchange-httpd_metrics.c taler-exchange-httpd_metrics.h \
taler-exchange-httpd_mhd.c taler-exchange-httpd_mhd.h \
taler-exchange-httpd_purses_create.c taler-exchange-httpd_purses_create.h \
+ taler-exchange-httpd_purses_deposit.c taler-exchange-httpd_purses_deposit.h \
taler-exchange-httpd_purses_merge.c taler-exchange-httpd_purses_merge.h \
taler-exchange-httpd_recoup.c taler-exchange-httpd_recoup.h \
taler-exchange-httpd_recoup-refresh.c taler-exchange-httpd_recoup-refresh.h \
diff --git a/src/exchange/taler-exchange-httpd_metrics.h b/src/exchange/taler-exchange-httpd_metrics.h
index ac9e5b505..1e08c6ac7 100644
--- a/src/exchange/taler-exchange-httpd_metrics.h
+++ b/src/exchange/taler-exchange-httpd_metrics.h
@@ -38,7 +38,8 @@ enum TEH_MetricTypeRequest
TEH_MT_REQUEST_PURSE_CREATE = 4,
TEH_MT_REQUEST_PURSE_MERGE = 5,
TEH_MT_REQUEST_RESERVE_PURSE = 6,
- TEH_MT_REQUEST_COUNT = 7 /* MUST BE LAST! */
+ TEH_MT_REQUEST_PURSE_DEPOSIT = 7,
+ TEH_MT_REQUEST_COUNT = 8 /* MUST BE LAST! */
};
/**
diff --git a/src/exchange/taler-exchange-httpd_purses_deposit.c b/src/exchange/taler-exchange-httpd_purses_deposit.c
index 193953a4e..2c0991e00 100644
--- a/src/exchange/taler-exchange-httpd_purses_deposit.c
+++ b/src/exchange/taler-exchange-httpd_purses_deposit.c
@@ -97,6 +97,16 @@ struct PurseDepositContext
struct GNUNET_TIME_Timestamp purse_expiration;
/**
+ * Key with the merge capability (needed for signing).
+ */
+ struct TALER_PurseMergePublicKeyP merge_pub;
+
+ /**
+ * Hash of the contract (needed for signing).
+ */
+ struct TALER_PrivateContractHashP h_contract_terms;
+
+ /**
* Our current time.
*/
struct GNUNET_TIME_Timestamp exchange_timestamp;
@@ -134,13 +144,15 @@ reply_deposit_success (struct MHD_Connection *connection,
enum TALER_ErrorCode ec;
if (TALER_EC_NONE !=
- (ec = TALER_exchange_online_purse_deposited_sign (
+ (ec = TALER_exchange_online_purse_created_sign (
&TEH_keys_exchange_sign_,
pcc->exchange_timestamp,
pcc->purse_expiration,
&pcc->amount,
&pcc->deposit_total,
pcc->purse_pub,
+ &pcc->merge_pub,
+ &pcc->h_contract_terms,
&pub,
&sig)))
{
@@ -183,7 +195,6 @@ deposit_transaction (void *cls,
{
struct PurseDepositContext *pcc = cls;
enum GNUNET_DB_QueryStatus qs;
- bool in_conflict = true;
for (unsigned int i = 0; i<pcc->num_coins; i++)
{
@@ -539,7 +550,8 @@ TEH_handler_purses_deposit (
"deposits");
}
/* FIXME: fetch basic purse properties
- (min age, purse_expiration, amount) from
+ (min age, purse_expiration, amount, merge_pub,
+ h_contract_terms) from
DB. Generate 404 or 410 (Gone) replies if
applicable. */