gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis] branch master updated (77ccde7 -> 9d764c3)


From: gnunet
Subject: [taler-anastasis] branch master updated (77ccde7 -> 9d764c3)
Date: Fri, 21 Jan 2022 21:43:17 +0100

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

grothoff pushed a change to branch master
in repository anastasis.

    from 77ccde7  -implement provider_sync transition
     new ff8f709  -get test to pass again
     new 9d764c3  add sync providers logic to other affected test

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 ..._anastasis_reducer_recovery_enter_user_attributes.sh | 16 ++++++++++++++++
 src/cli/test_anastasis_reducer_recovery_no_pay.sh       | 17 ++++++++++++++++-
 src/lib/anastasis_recovery.c                            |  5 ++---
 src/reducer/anastasis_api_recovery_redux.c              |  4 ++++
 4 files changed, 38 insertions(+), 4 deletions(-)

diff --git a/src/cli/test_anastasis_reducer_recovery_enter_user_attributes.sh 
b/src/cli/test_anastasis_reducer_recovery_enter_user_attributes.sh
index be04f96..43c6a4e 100755
--- a/src/cli/test_anastasis_reducer_recovery_enter_user_attributes.sh
+++ b/src/cli/test_anastasis_reducer_recovery_enter_user_attributes.sh
@@ -436,6 +436,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/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]