summaryrefslogtreecommitdiff
path: root/src/bank-lib
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-06-11 17:04:54 +0200
committerChristian Grothoff <christian@grothoff.org>2017-06-11 17:04:54 +0200
commit0580168c0e546a7a224c1e9f19e7b526f84cfa2a (patch)
tree8bf9c3d24b34670270996004c0e4aa12ffb60287 /src/bank-lib
parentba17729f6568efab7cacfc292670169437cbbda8 (diff)
downloadexchange-0580168c0e546a7a224c1e9f19e7b526f84cfa2a.tar.gz
exchange-0580168c0e546a7a224c1e9f19e7b526f84cfa2a.tar.bz2
exchange-0580168c0e546a7a224c1e9f19e7b526f84cfa2a.zip
automated refunds of expired reserves now work and tested, fixes #4956
Diffstat (limited to 'src/bank-lib')
-rw-r--r--src/bank-lib/fakebank.c15
1 files changed, 15 insertions, 0 deletions
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);