summaryrefslogtreecommitdiff
path: root/src/exchangedb/pg_do_purse_deposit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/exchangedb/pg_do_purse_deposit.c')
-rw-r--r--src/exchangedb/pg_do_purse_deposit.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/exchangedb/pg_do_purse_deposit.c b/src/exchangedb/pg_do_purse_deposit.c
index 25496a262..bdb1f4749 100644
--- a/src/exchangedb/pg_do_purse_deposit.c
+++ b/src/exchangedb/pg_do_purse_deposit.c
@@ -35,6 +35,7 @@ TEH_PG_do_purse_deposit (
const struct TALER_CoinSpendSignatureP *coin_sig,
const struct TALER_Amount *amount_minus_fee,
bool *balance_ok,
+ bool *too_late,
bool *conflict)
{
struct PostgresClosure *pg = cls;
@@ -46,10 +47,14 @@ TEH_PG_do_purse_deposit (
? GNUNET_PQ_query_param_null ()
: GNUNET_PQ_query_param_uint64 (&partner_id),
GNUNET_PQ_query_param_auto_from_type (purse_pub),
- TALER_PQ_query_param_amount (amount),
+ TALER_PQ_query_param_amount (
+ pg->conn,
+ amount),
GNUNET_PQ_query_param_auto_from_type (coin_pub),
GNUNET_PQ_query_param_auto_from_type (coin_sig),
- TALER_PQ_query_param_amount (amount_minus_fee),
+ TALER_PQ_query_param_amount (
+ pg->conn,
+ amount_minus_fee),
GNUNET_PQ_query_param_timestamp (&reserve_expiration),
GNUNET_PQ_query_param_timestamp (&now),
GNUNET_PQ_query_param_end
@@ -57,6 +62,8 @@ TEH_PG_do_purse_deposit (
struct GNUNET_PQ_ResultSpec rs[] = {
GNUNET_PQ_result_spec_bool ("balance_ok",
balance_ok),
+ GNUNET_PQ_result_spec_bool ("too_late",
+ too_late),
GNUNET_PQ_result_spec_bool ("conflict",
conflict),
GNUNET_PQ_result_spec_end
@@ -72,8 +79,9 @@ TEH_PG_do_purse_deposit (
"SELECT "
" out_balance_ok AS balance_ok"
",out_conflict AS conflict"
+ ",out_late AS too_late"
" FROM exchange_do_purse_deposit"
- " ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10);");
+ " ($1,$2,$3,$4,$5,$6,$7,$8);");
return GNUNET_PQ_eval_prepared_singleton_select (pg->conn,
"call_purse_deposit",