From 0580168c0e546a7a224c1e9f19e7b526f84cfa2a Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 11 Jun 2017 17:04:54 +0200 Subject: automated refunds of expired reserves now work and tested, fixes #4956 --- src/bank-lib/fakebank.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/bank-lib') diff --git a/src/bank-lib/fakebank.c b/src/bank-lib/fakebank.c index 037698c35..268924151 100644 --- a/src/bank-lib/fakebank.c +++ b/src/bank-lib/fakebank.c @@ -507,6 +507,12 @@ handle_history (struct TALER_FAKEBANK_Handle *h, GNUNET_break (0); return MHD_NO; } + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Client asked for up to %lld results of type %s for account %llu starting at %s\n", + count, + dir, + (unsigned long long) account_number, + start); if (NULL == dir) direction = TALER_BANK_DIRECTION_BOTH; else if (0 == strcasecmp (dir, @@ -544,6 +550,7 @@ handle_history (struct TALER_FAKEBANK_Handle *h, /* list is empty */ pos = NULL; } + history = json_array (); while ( (NULL != pos) && (0 != count) ) @@ -551,6 +558,12 @@ handle_history (struct TALER_FAKEBANK_Handle *h, json_t *trans; char *subject; + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Found transaction over %s from %llu to %llu\n", + TALER_amount2s (&pos->amount), + (unsigned long long) pos->debit_account, + (unsigned long long) pos->credit_account); + if (! ( ( (account_number == pos->debit_account) && (0 != (direction & TALER_BANK_DIRECTION_DEBIT)) ) || ( (account_number == pos->credit_account) && @@ -595,6 +608,8 @@ handle_history (struct TALER_FAKEBANK_Handle *h, struct MHD_Response *resp; json_decref (history); + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Returning empty transaction history\n"); resp = MHD_create_response_from_buffer (0, "", MHD_RESPMEM_PERSISTENT); -- cgit v1.2.3