diff options
Diffstat (limited to 'src/exchange')
-rw-r--r-- | src/exchange/taler-exchange-httpd_age-withdraw.c | 15 | ||||
-rw-r--r-- | src/exchange/taler-exchange-httpd_batch-withdraw.c | 5 |
2 files changed, 18 insertions, 2 deletions
diff --git a/src/exchange/taler-exchange-httpd_age-withdraw.c b/src/exchange/taler-exchange-httpd_age-withdraw.c index 0978421a..d9475e8f 100644 --- a/src/exchange/taler-exchange-httpd_age-withdraw.c +++ b/src/exchange/taler-exchange-httpd_age-withdraw.c @@ -92,9 +92,20 @@ struct AgeWithdrawContext struct TALER_EXCHANGEDB_AgeWithdrawCommitment commitment; /** - * Current time for the DB transaction. + * Number of coins/denonations in the reveal */ - struct GNUNET_TIME_Timestamp now; + uint32_t num_coins; + + /** + * kappa * #num_coins hashes of blinded coin planchets. + */ + struct TALER_BlindedPlanchet *coin_evs; + + /** + * #num_coins hashes of the denominations from which the coins are withdrawn. + * Those must support age restriction. + */ + struct TALER_DenominationHashP *denoms_h; }; diff --git a/src/exchange/taler-exchange-httpd_batch-withdraw.c b/src/exchange/taler-exchange-httpd_batch-withdraw.c index 9d7d64cb..04a9d720 100644 --- a/src/exchange/taler-exchange-httpd_batch-withdraw.c +++ b/src/exchange/taler-exchange-httpd_batch-withdraw.c @@ -466,10 +466,12 @@ batch_withdraw_transaction (void *cls, return qs; } wc->kyc.ok = true; + qs = TEH_plugin->do_batch_withdraw (TEH_plugin->cls, wc->now, wc->reserve_pub, &wc->batch_total, + /* TODO[oec]: add parameter for maximum age and [out]parameter for required age */ &found, &balance_ok, &ruuid); @@ -493,6 +495,9 @@ batch_withdraw_transaction (void *cls, NULL); return GNUNET_DB_STATUS_HARD_ERROR; } + + /* TODO[oec]: add error handling for age restriction requirements */ + if (! balance_ok) { TEH_plugin->rollback (TEH_plugin->cls); |