gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r13823 - gnunet/src/dht


From: gnunet
Subject: [GNUnet-SVN] r13823 - gnunet/src/dht
Date: Mon, 29 Nov 2010 15:59:14 +0100

Author: nevans
Date: 2010-11-29 15:59:14 +0100 (Mon, 29 Nov 2010)
New Revision: 13823

Modified:
   gnunet/src/dht/gnunet-service-dht.c
Log:
tracking down strange routing behavior

Modified: gnunet/src/dht/gnunet-service-dht.c
===================================================================
--- gnunet/src/dht/gnunet-service-dht.c 2010-11-29 14:44:05 UTC (rev 13822)
+++ gnunet/src/dht/gnunet-service-dht.c 2010-11-29 14:59:14 UTC (rev 13823)
@@ -2669,7 +2669,6 @@
 #if DEBUG_DHT_ROUTING
       if ((debug_routes_extended) && (dhtlog_handle != NULL))
         {
-          /** Log routes that die due to high load! */
           dhtlog_handle->insert_route (NULL, msg_ctx->unique_id, DHTLOG_ROUTE,
                                        msg_ctx->hop_count, GNUNET_SYSERR,
                                        &my_identity, &msg_ctx->key, 
msg_ctx->peer,
@@ -2688,7 +2687,6 @@
 #if DEBUG_DHT_ROUTING
       if ((debug_routes_extended) && (dhtlog_handle != NULL))
         {
-          /** Log routes that die due to high load! */
           dhtlog_handle->insert_route (NULL, msg_ctx->unique_id, DHTLOG_ROUTE,
                                        msg_ctx->hop_count, GNUNET_SYSERR,
                                        &my_identity, &msg_ctx->key, 
msg_ctx->peer,
@@ -3095,7 +3093,9 @@
   my_matching_bits = GNUNET_CRYPTO_hash_matching_bits(target, 
&my_identity.hashPubKey);
 
   total_distance = 0;
-  if (strict_kademlia == GNUNET_YES)
+  /** If we are doing kademlia routing, or converge is binary (saves some 
cycles) */
+  if ((strict_kademlia == GNUNET_YES) ||
+      ((converge_option == DHT_CONVERGE_BINARY) && (hops >= 
converge_modifier)))
     {
       largest_distance = 0;
       chosen = NULL;
@@ -3223,7 +3223,7 @@
 
   if (total_distance == 0) /* No peers to select from! */
     {
-      increment_stats("# select_peer, total_distance == 0");
+      increment_stats("# failed to select peer");
       return NULL;
     }
 
@@ -3660,7 +3660,8 @@
 demultiplex_message(const struct GNUNET_MessageHeader *msg,
                     struct DHT_MessageContext *msg_ctx)
 {
-  msg_ctx->closest = am_closest_peer(&msg_ctx->key, NULL);
+  /* FIXME: Should we use closest excluding those we won't route to (the 
bloomfilter problem)? */
+  msg_ctx->closest = am_closest_peer(&msg_ctx->key, msg_ctx->bloom);
   switch (ntohs(msg->type))
     {
     case GNUNET_MESSAGE_TYPE_DHT_GET: /* Add to hashmap of requests seen, 
search for data (always) */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]