gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet] branch master updated: - fix closest peer algorithm


From: gnunet
Subject: [gnunet] branch master updated: - fix closest peer algorithm
Date: Fri, 10 Dec 2021 09:37:02 +0100

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

martin-schanzenbach pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 8e94bfad6 - fix closest peer algorithm
8e94bfad6 is described below

commit 8e94bfad642ed73732f052a9fb51892fb32fa2e3
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Fri Dec 10 09:36:56 2021 +0100

    - fix closest peer algorithm
---
 src/dht/gnunet-service-dht_neighbours.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/dht/gnunet-service-dht_neighbours.c 
b/src/dht/gnunet-service-dht_neighbours.c
index 02dab849b..fb061d5b1 100644
--- a/src/dht/gnunet-service-dht_neighbours.c
+++ b/src/dht/gnunet-service-dht_neighbours.c
@@ -963,8 +963,6 @@ GDS_am_closest_peer (const struct GNUNET_HashCode *key,
                                                    key);
     if (other_bits > bits)
       return GNUNET_NO;
-    if (other_bits == bits)     /* We match the same number of bits */
-      return GNUNET_YES;
     pos = pos->next;
   }
   /* No peers closer, we are the closest! */
@@ -1924,6 +1922,7 @@ handle_find_peer (const struct GNUNET_PeerIdentity 
*sender,
   }
 
   /* then, also consider sending a random HELLO from the closest bucket */
+  /* FIXME: How can this be true? Shouldnt we just do find_bucket() ? */
   if (0 == memcmp (&my_identity_hash,
                    key,
                    sizeof(struct GNUNET_HashCode)))

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