gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis] branch master updated: -do not append zero costs


From: gnunet
Subject: [taler-anastasis] branch master updated: -do not append zero costs
Date: Wed, 14 Jul 2021 11:09:50 +0200

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

grothoff pushed a commit to branch master
in repository anastasis.

The following commit(s) were added to refs/heads/master by this push:
     new 8c5884f  -do not append zero costs
8c5884f is described below

commit 8c5884fddf6e77fe7ee1eb5eea37796ae5ad6397
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Wed Jul 14 11:09:48 2021 +0200

    -do not append zero costs
---
 src/reducer/anastasis_api_backup_redux.c | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/src/reducer/anastasis_api_backup_redux.c 
b/src/reducer/anastasis_api_backup_redux.c
index 05d1075..dc3055a 100644
--- a/src/reducer/anastasis_api_backup_redux.c
+++ b/src/reducer/anastasis_api_backup_redux.c
@@ -2444,14 +2444,19 @@ update_expiration_cost (json_t *state,
     while (NULL != costs)
     {
       struct Costs *nxt = costs->next;
-      json_t *ao;
 
-      ao = json_pack ("{s:o}",
-                      "fee",
-                      TALER_JSON_from_amount (&costs->cost));
-      GNUNET_assert (0 ==
-                     json_array_append_new (arr,
-                                            ao));
+      if ( (0 != costs->cost.value) ||
+           (0 != costs->cost.fraction) )
+      {
+        json_t *ao;
+
+        ao = json_pack ("{s:o}",
+                        "fee",
+                        TALER_JSON_from_amount (&costs->cost));
+        GNUNET_assert (0 ==
+                       json_array_append_new (arr,
+                                              ao));
+      }
       GNUNET_free (costs);
       costs = nxt;
     }

-- 
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]