aboutsummaryrefslogtreecommitdiff
path: root/src/exchangedb/pg_do_batch_withdraw.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/exchangedb/pg_do_batch_withdraw.c')
-rw-r--r--src/exchangedb/pg_do_batch_withdraw.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/exchangedb/pg_do_batch_withdraw.c b/src/exchangedb/pg_do_batch_withdraw.c
index 3dee20d2..6b581673 100644
--- a/src/exchangedb/pg_do_batch_withdraw.c
+++ b/src/exchangedb/pg_do_batch_withdraw.c
@@ -17,6 +17,7 @@
* @file exchangedb/pg_do_batch_withdraw.c
* @brief Implementation of the do_batch_withdraw function for Postgres
* @author Christian Grothoff
+ * @author Özgür Kesim
*/
#include "platform.h"
#include "taler_error_codes.h"
@@ -32,8 +33,11 @@ TEH_PG_do_batch_withdraw (
struct GNUNET_TIME_Timestamp now,
const struct TALER_ReservePublicKeyP *reserve_pub,
const struct TALER_Amount *amount,
+ bool do_age_check,
bool *found,
bool *balance_ok,
+ bool *age_ok,
+ uint16_t *allowed_maximum_age,
uint64_t *ruuid)
{
struct PostgresClosure *pg = cls;
@@ -41,6 +45,7 @@ TEH_PG_do_batch_withdraw (
struct GNUNET_PQ_QueryParam params[] = {
TALER_PQ_query_param_amount (amount),
GNUNET_PQ_query_param_auto_from_type (reserve_pub),
+ GNUNET_PQ_query_param_bool (do_age_check),
GNUNET_PQ_query_param_timestamp (&now),
GNUNET_PQ_query_param_timestamp (&gc),
GNUNET_PQ_query_param_end
@@ -50,6 +55,10 @@ TEH_PG_do_batch_withdraw (
found),
GNUNET_PQ_result_spec_bool ("balance_ok",
balance_ok),
+ GNUNET_PQ_result_spec_bool ("age_ok",
+ age_ok),
+ GNUNET_PQ_result_spec_uint16 ("allowed_maximum_age",
+ allowed_maximum_age),
GNUNET_PQ_result_spec_uint64 ("ruuid",
ruuid),
GNUNET_PQ_result_spec_end
@@ -67,6 +76,8 @@ TEH_PG_do_batch_withdraw (
"SELECT "
" reserve_found"
",balance_ok"
+ ",age_ok"
+ ",required_age"
",ruuid"
" FROM exchange_do_batch_withdraw"
" ($1,$2,$3,$4,$5);");