From 29a2f9b345ecd8a6c062b3b3cfa719a8a4ec2a08 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 3 Apr 2017 16:40:31 +0200 Subject: implement rest of exchange logic for #3887 (return payback information in reserve and coin histories) --- src/exchange/taler-exchange-httpd_db.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/exchange/taler-exchange-httpd_db.c') 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); } -- cgit v1.2.3