gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r34230 - gnunet/src/dht
Date: Thu, 28 Aug 2014 09:30:07 +0200

Author: supriti
Date: 2014-08-28 09:30:07 +0200 (Thu, 28 Aug 2014)
New Revision: 34230

Modified:
   gnunet/src/dht/gnunet-service-xdht_neighbours.c
Log:
Exponential backoff for find finger trail task


Modified: gnunet/src/dht/gnunet-service-xdht_neighbours.c
===================================================================
--- gnunet/src/dht/gnunet-service-xdht_neighbours.c     2014-08-27 19:59:10 UTC 
(rev 34229)
+++ gnunet/src/dht/gnunet-service-xdht_neighbours.c     2014-08-28 07:30:07 UTC 
(rev 34230)
@@ -963,6 +963,10 @@
 static unsigned int successor_times;
 
 /**
+ * Number of rounds for which we should search for finger.
+ */
+static unsigned int fingers_round_count;
+/**
  * Called when core is ready to send a message we asked for
  * out to the destination.
  *
@@ -3507,6 +3511,13 @@
     {
 //      find_finger_trail_task_next_send_time = 
 //              GNUNET_TIME_STD_BACKOFF(find_finger_trail_task_next_send_time);
+      if (0 == fingers_round_count)
+      {
+         find_finger_trail_task_next_send_time = 
+              GNUNET_TIME_STD_BACKOFF(find_finger_trail_task_next_send_time);
+      }
+      else
+        fingers_round_count--;
       current_search_finger_index = 0;
       GNUNET_STATISTICS_update (GDS_stats,
                                 gettext_noop
@@ -6081,6 +6092,7 @@
   friend_peermap = GNUNET_CONTAINER_multipeermap_create (256, GNUNET_NO);
   finger_table_init ();
   successor_times = 10;
+  fingers_round_count = 5;
   find_finger_trail_task_next_send_time.rel_value_us =
       DHT_FIND_FINGER_TRAIL_INTERVAL.rel_value_us +
       GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK,




reply via email to

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