gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-exchange] branch master updated: return 204 on empty transaction


From: gnunet
Subject: [taler-exchange] branch master updated: return 204 on empty transaction history, as per API
Date: Mon, 19 Dec 2022 14:13:57 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new 80660f2d return 204 on empty transaction history, as per API
80660f2d is described below

commit 80660f2d882391118d7ad41f73d495d3f84e2244
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Mon Dec 19 14:13:55 2022 +0100

    return 204 on empty transaction history, as per API
---
 src/bank-lib/fakebank.c              | 26 ++++++++++++++++++++------
 src/benchmark/taler-bank-benchmark.c |  3 ---
 2 files changed, 20 insertions(+), 9 deletions(-)

diff --git a/src/bank-lib/fakebank.c b/src/bank-lib/fakebank.c
index b3d3250a..81029041 100644
--- a/src/bank-lib/fakebank.c
+++ b/src/bank-lib/fakebank.c
@@ -2312,14 +2312,21 @@ handle_debit_history (struct TALER_FAKEBANK_Handle *h,
       pos = t;
     }
   }
+  if (0 == ha.delta)
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+                "No debit transactions exist after given starting point\n");
+    return TALER_MHD_reply_static (connection,
+                                   MHD_HTTP_NO_CONTENT,
+                                   NULL,
+                                   NULL,
+                                   0);
+  }
   if (NULL != pos)
     GNUNET_log (GNUNET_ERROR_TYPE_INFO,
                 "Returning %lld debit transactions starting (inclusive) from 
%llu\n",
                 (long long) ha.delta,
                 (unsigned long long) pos->row_id);
-  else
-    GNUNET_log (GNUNET_ERROR_TYPE_INFO,
-                "No debit transactions exist after given starting point\n");
   while ( (0 != ha.delta) &&
           (NULL != pos) )
   {
@@ -2525,14 +2532,21 @@ handle_credit_history (struct TALER_FAKEBANK_Handle *h,
       pos = t;
     }
   }
+  if (0 == ha.delta)
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+                "No credit transactions exist after given starting point\n");
+    return TALER_MHD_reply_static (connection,
+                                   MHD_HTTP_NO_CONTENT,
+                                   NULL,
+                                   NULL,
+                                   0);
+  }
   if (NULL != pos)
     GNUNET_log (GNUNET_ERROR_TYPE_INFO,
                 "Returning %lld credit transactions starting (inclusive) from 
%llu\n",
                 (long long) ha.delta,
                 (unsigned long long) pos->row_id);
-  else
-    GNUNET_log (GNUNET_ERROR_TYPE_INFO,
-                "No credit transactions exist after given starting point\n");
   while ( (0 != ha.delta) &&
           (NULL != pos) )
   {
diff --git a/src/benchmark/taler-bank-benchmark.c 
b/src/benchmark/taler-bank-benchmark.c
index 03731625..7c2e51f1 100644
--- a/src/benchmark/taler-bank-benchmark.c
+++ b/src/benchmark/taler-bank-benchmark.c
@@ -576,9 +576,6 @@ parallel_benchmark (void)
       GNUNET_break (GNUNET_OK ==
                     GNUNET_OS_process_wait (dbinit));
       GNUNET_OS_process_destroy (dbinit);
-      GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                  "Done with DB init with `%s'\n",
-                  cfg_filename);
     }
     /* start exchange wirewatch */
     for (unsigned int w = 0; w<start_wirewatch; w++)

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]