diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-09-26 14:50:49 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-09-26 14:50:49 +0200 |
commit | 302a08b7018b18a18939d49e132ca8db78a2be9a (patch) | |
tree | 44ab352820b814d87663ccd33cb8c5727bc44b1d /src/exchange/taler-exchange-httpd_db.c | |
parent | 265fc74b656910dda559f410aa140c57de261cc9 (diff) | |
download | exchange-302a08b7018b18a18939d49e132ca8db78a2be9a.tar.gz exchange-302a08b7018b18a18939d49e132ca8db78a2be9a.tar.bz2 exchange-302a08b7018b18a18939d49e132ca8db78a2be9a.zip |
implement that /track/transaction returns execution time (#4578)
Diffstat (limited to 'src/exchange/taler-exchange-httpd_db.c')
-rw-r--r-- | src/exchange/taler-exchange-httpd_db.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/exchange/taler-exchange-httpd_db.c b/src/exchange/taler-exchange-httpd_db.c index f1c69b7a9..d265f6f47 100644 --- a/src/exchange/taler-exchange-httpd_db.c +++ b/src/exchange/taler-exchange-httpd_db.c @@ -1773,6 +1773,11 @@ struct WtidTransactionContext struct GNUNET_HashCode h_wire; /** + * Execution time of the wire transfer + */ + struct GNUNET_TIME_Absolute exec_time; + + /** * Head of DLL with details for /wire/deposit response. */ struct TMH_TrackTransferDetail *wdd_head; @@ -1806,6 +1811,7 @@ struct WtidTransactionContext * @param cls our context for transmission * @param merchant_pub public key of the merchant (should be same for all callbacks with the same @e cls) * @param h_wire hash of wire transfer details of the merchant (should be same for all callbacks with the same @e cls) + * @param exec_time execution time of the wire transfer (should be same for all callbacks with the same @e cls) * @param h_contract which contract was this payment about * @param transaction_id merchant's transaction ID for the payment * @param coin_pub which public key was this payment about @@ -1816,6 +1822,7 @@ static void handle_transaction_data (void *cls, const struct TALER_MerchantPublicKeyP *merchant_pub, const struct GNUNET_HashCode *h_wire, + struct GNUNET_TIME_Absolute exec_time, const struct GNUNET_HashCode *h_contract, uint64_t transaction_id, const struct TALER_CoinSpendPublicKeyP *coin_pub, @@ -1832,6 +1839,7 @@ handle_transaction_data (void *cls, { ctx->merchant_pub = *merchant_pub; ctx->h_wire = *h_wire; + ctx->exec_time = exec_time; ctx->is_valid = GNUNET_YES; if (GNUNET_OK != TALER_amount_subtract (&ctx->total, @@ -1939,6 +1947,7 @@ TMH_DB_execute_track_transfer (struct MHD_Connection *connection, &ctx.total, &ctx.merchant_pub, &ctx.h_wire, + ctx.exec_time, ctx.wdd_head); cleanup: while (NULL != (wdd = ctx.wdd_head)) |