aboutsummaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_purses_create.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/exchange/taler-exchange-httpd_purses_create.c')
-rw-r--r--src/exchange/taler-exchange-httpd_purses_create.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/exchange/taler-exchange-httpd_purses_create.c b/src/exchange/taler-exchange-httpd_purses_create.c
index f3da2c85..130f9fae 100644
--- a/src/exchange/taler-exchange-httpd_purses_create.c
+++ b/src/exchange/taler-exchange-httpd_purses_create.c
@@ -201,6 +201,7 @@ create_transaction (void *cls,
struct TEH_PurseDepositedCoin *coin = &pcc->coins[i];
bool balance_ok = false;
bool conflict = true;
+ bool too_late = true;
qs = TEH_make_coin_known (&coin->cpi,
connection,
@@ -215,6 +216,7 @@ create_transaction (void *cls,
&coin->coin_sig,
&coin->amount_minus_fee,
&balance_ok,
+ &too_late,
&conflict);
if (qs <= 0)
{
@@ -243,6 +245,15 @@ create_transaction (void *cls,
&coin->cpi.coin_pub);
return GNUNET_DB_STATUS_HARD_ERROR;
}
+ if (too_late)
+ {
+ *mhd_ret
+ = TALER_MHD_reply_with_ec (
+ connection,
+ TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE,
+ "too late to deposit on purse creation");
+ return GNUNET_DB_STATUS_HARD_ERROR;
+ }
if (conflict)
{
struct TALER_Amount amount;