summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_db.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-04-03 16:40:31 +0200
committerChristian Grothoff <christian@grothoff.org>2017-04-03 16:40:31 +0200
commit29a2f9b345ecd8a6c062b3b3cfa719a8a4ec2a08 (patch)
tree5b8849767e0eb1941e03a99ef3eaa53fb6e427d7 /src/exchange/taler-exchange-httpd_db.c
parent5b867c4b8ece4b4f92ff206fa75a4ea29d870221 (diff)
downloadexchange-29a2f9b345ecd8a6c062b3b3cfa719a8a4ec2a08.tar.gz
exchange-29a2f9b345ecd8a6c062b3b3cfa719a8a4ec2a08.tar.bz2
exchange-29a2f9b345ecd8a6c062b3b3cfa719a8a4ec2a08.zip
implement rest of exchange logic for #3887 (return payback information in reserve and coin histories)
Diffstat (limited to 'src/exchange/taler-exchange-httpd_db.c')
-rw-r--r--src/exchange/taler-exchange-httpd_db.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/exchange/taler-exchange-httpd_db.c b/src/exchange/taler-exchange-httpd_db.c
index 3dc4a3248..11f8d31d3 100644
--- a/src/exchange/taler-exchange-httpd_db.c
+++ b/src/exchange/taler-exchange-httpd_db.c
@@ -2335,7 +2335,7 @@ TEH_DB_execute_payback (struct MHD_Connection *connection,
struct TALER_ReservePublicKeyP reserve_pub;
struct TALER_Amount amount;
struct TALER_Amount spent;
- struct GNUNET_TIME_Absolute payback_deadline;
+ struct GNUNET_TIME_Absolute now;
if (NULL == (session = TEH_plugin->get_session (TEH_plugin->cls)))
{
@@ -2406,6 +2406,8 @@ TEH_DB_execute_payback (struct MHD_Connection *connection,
}
TEH_plugin->free_coin_transaction_list (TEH_plugin->cls,
tl);
+ now = GNUNET_TIME_absolute_get ();
+ (void) GNUNET_TIME_round_abs (&now);
/* add coin to list of wire transfers for payback */
ret = TEH_plugin->insert_payback_request (TEH_plugin->cls,
@@ -2416,7 +2418,7 @@ TEH_DB_execute_payback (struct MHD_Connection *connection,
coin_blind,
&amount,
h_blind,
- &payback_deadline);
+ now);
if (GNUNET_SYSERR == ret)
{
TALER_LOG_WARNING ("Failed to store /payback information in database\n");
@@ -2432,7 +2434,7 @@ TEH_DB_execute_payback (struct MHD_Connection *connection,
&coin->coin_pub,
&reserve_pub,
&amount,
- payback_deadline);
+ now);
}