add purses_deposit to build
This commit is contained in:
parent
8ef3997160
commit
c30c7cde4d
@ -1 +1 @@
|
||||
Subproject commit 138acf20b87d796543e9eaa68f98e5e8ae2e7302
|
||||
Subproject commit c2580e60259ba3aea2e69ea9da43482008b90d7c
|
@ -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 \
|
||||
|
@ -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! */
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -96,6 +96,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.
|
||||
*/
|
||||
@ -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. */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user