gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis] 01/02: -get test to pass again


From: gnunet
Subject: [taler-anastasis] 01/02: -get test to pass again
Date: Fri, 21 Jan 2022 21:43:18 +0100

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

grothoff pushed a commit to branch master
in repository anastasis.

commit ff8f70962f43cfe01ab9444cae77b4301f3b171a
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Fri Jan 21 21:42:23 2022 +0100

    -get test to pass again
---
 src/cli/test_anastasis_reducer_recovery_no_pay.sh | 17 ++++++++++++++++-
 src/lib/anastasis_recovery.c                      |  5 ++---
 src/reducer/anastasis_api_recovery_redux.c        |  4 ++++
 3 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/src/cli/test_anastasis_reducer_recovery_no_pay.sh 
b/src/cli/test_anastasis_reducer_recovery_no_pay.sh
index a80b030..6a1ed0f 100755
--- a/src/cli/test_anastasis_reducer_recovery_no_pay.sh
+++ b/src/cli/test_anastasis_reducer_recovery_no_pay.sh
@@ -220,7 +220,6 @@ anastasis-reducer -a '{"provider_url" : 
"http://localhost:8086/"; }' add_provider
 echo " OK"
 
 echo -n "Selecting secret to recover"
-bash
 anastasis-reducer -a '{"version": 0, "mask": 0, "provider_url" : 
"http://localhost:8086/"; }' next < $R1FILE > $R2FILE
 
 STATE=`jq -r -e .recovery_state < $R2FILE`
@@ -230,6 +229,22 @@ then
 fi
 echo " OK"
 
+echo -n "Synchronizing providers"
+anastasis-reducer sync_providers < $R2FILE > $R1FILE
+anastasis-reducer sync_providers < $R1FILE > $R2FILE
+# This one will fail, as we should now have all 3 providers
+# used by the policy in sync!
+anastasis-reducer sync_providers < $R2FILE > $R1FILE 2> /dev/null || true
+# Note: continue with $R2FILE, the last one that was valid!
+
+CODE=`jq -r -e .code < $R1FILE`
+if test "$CODE" != "8400"
+then
+    exit_fail "Expected to be synced, instead the code is '$CODE'"
+fi
+echo " OK"
+
+
 echo -n "Running challenge logic ..."
 
 UUID0=`jq -r -e .recovery_information.challenges[0].uuid < $R2FILE`
diff --git a/src/lib/anastasis_recovery.c b/src/lib/anastasis_recovery.c
index 3a7943e..9e5d1ca 100644
--- a/src/lib/anastasis_recovery.c
+++ b/src/lib/anastasis_recovery.c
@@ -1095,7 +1095,7 @@ ANASTASIS_recovery_serialize (const struct 
ANASTASIS_Recovery *r)
  * @param cs_arr serialized data to parse
  * @return #GNUNET_OK on success
  */
-static int
+static enum GNUNET_GenericReturnValue
 parse_cs_array (struct ANASTASIS_Recovery *r,
                 json_t *cs_arr)
 {
@@ -1173,7 +1173,6 @@ parse_cs_array (struct ANASTASIS_Recovery *r,
       }
     }
   }
-
   return GNUNET_OK;
 }
 
@@ -1185,7 +1184,7 @@ parse_cs_array (struct ANASTASIS_Recovery *r,
  * @param dps_arr serialized data to parse
  * @return #GNUNET_OK on success
  */
-static int
+static enum GNUNET_GenericReturnValue
 parse_dps_array (struct ANASTASIS_Recovery *r,
                  json_t *dps_arr)
 {
diff --git a/src/reducer/anastasis_api_recovery_redux.c 
b/src/reducer/anastasis_api_recovery_redux.c
index 86f05e4..5f087f3 100644
--- a/src/reducer/anastasis_api_recovery_redux.c
+++ b/src/reducer/anastasis_api_recovery_redux.c
@@ -1990,6 +1990,10 @@ sync_progress (void *cls,
   struct SyncEntry *se = cls;
   struct MasterSync *ms = se->ms;
 
+  GNUNET_CONTAINER_DLL_remove (ms->se_head,
+                               ms->se_tail,
+                               se);
+  GNUNET_free (se);
   ms->cb (ms->cb_cls,
           error,
           new_state);

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