gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet] branch master updated: -fix typos causing FTBFS:


From: gnunet
Subject: [gnunet] branch master updated: -fix typos causing FTBFS:
Date: Sun, 02 Jan 2022 22:12:04 +0100

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

grothoff pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new e272dddaa -fix typos causing FTBFS:
e272dddaa is described below

commit e272dddaa9020f43c2cc58d8c318890bb9fe10c4
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sun Jan 2 22:12:02 2022 +0100

    -fix typos causing FTBFS:
---
 src/nse/gnunet-service-nse.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/nse/gnunet-service-nse.c b/src/nse/gnunet-service-nse.c
index 35278db29..56014752d 100644
--- a/src/nse/gnunet-service-nse.c
+++ b/src/nse/gnunet-service-nse.c
@@ -505,12 +505,18 @@ get_matching_bits (struct GNUNET_TIME_Absolute timestamp,
 {
   struct GNUNET_HashCode timestamp_hash;
   struct GNUNET_HashCode pid_hash;
+  struct GNUNET_HashCode xor;
 
   GNUNET_CRYPTO_hash (&timestamp.abs_value_us,
                       sizeof(timestamp.abs_value_us),
                       &timestamp_hash);
-  GNUNET_CRYPTO_hash (id, sizeof(struct GNUNET_PeerIdentity), &pid_hash);
-  return GNUNET_CRYPTO_hash_matching_bits (&timestamp_hash, &pid_hash);
+  GNUNET_CRYPTO_hash (id,
+                      sizeof(struct GNUNET_PeerIdentity),
+                      &pid_hash);
+  GNUNET_CRYPTO_hash_xor (&pid_hash,
+                          &timestamp_hash,
+                          &xor);
+  return GNUNET_CRYPTO_hash_count_leading_zeros (&xor);
 }
 
 
@@ -797,7 +803,7 @@ check_proof_of_work (const struct 
GNUNET_CRYPTO_EddsaPublicKey *pkey,
                           buf,
                           sizeof(buf),
                           &result);
-  return (GNUNET_CRYPTO_hash_count_leading_zeroes (&result) >=
+  return (GNUNET_CRYPTO_hash_count_leading_zeros (&result) >=
           nse_work_required)
     ? GNUNET_YES
     : GNUNET_NO;
@@ -862,7 +868,7 @@ find_proof (void *cls)
                             sizeof(buf),
                             &result);
     if (nse_work_required <=
-        GNUNET_CRYPTO_hash_count_leading_zeroes (&result))
+        GNUNET_CRYPTO_hash_count_leading_zeros (&result))
     {
       my_proof = counter;
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,

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