aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-07-25 15:20:48 +0000
committerChristian Grothoff <christian@grothoff.org>2011-07-25 15:20:48 +0000
commitab9c4e9d3795f07a12e86717f0a635080728ef81 (patch)
treebc4206b5a9e4a9771d5958c9b9696dccd394b131 /src
parentd2469f4bd8f26105392c7ccd110f38f6e2e8a8de (diff)
downloadgnunet-ab9c4e9d3795f07a12e86717f0a635080728ef81.tar.gz
gnunet-ab9c4e9d3795f07a12e86717f0a635080728ef81.zip
exponential back-off
Diffstat (limited to 'src')
-rw-r--r--src/fs/gnunet-service-fs_pe.c11
-rw-r--r--src/fs/gnunet-service-fs_pr.c4
-rw-r--r--src/nse/test_nse.conf6
-rw-r--r--src/nse/test_nse_multipeer.c3
4 files changed, 16 insertions, 8 deletions
diff --git a/src/fs/gnunet-service-fs_pe.c b/src/fs/gnunet-service-fs_pe.c
index b62c20005..b52e04712 100644
--- a/src/fs/gnunet-service-fs_pe.c
+++ b/src/fs/gnunet-service-fs_pe.c
@@ -159,10 +159,13 @@ plan (struct PeerPlan *pp,
159 total_delay * 1000LL / plan_count, 159 total_delay * 1000LL / plan_count,
160 GNUNET_NO); 160 GNUNET_NO);
161 prd = GSF_pending_request_get_data_ (rp->pr); 161 prd = GSF_pending_request_get_data_ (rp->pr);
162 // FIXME: calculate 'rp->earliest_transmission'! 162 // FIXME: calculate 'rp->priority'!
163 // FIXME: claculate 'rp->priority'! 163 if (rp->transmission_counter < 32)
164 delay = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 164 delay = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS,
165 rp->transmission_counter); 165 1LL << rp->transmission_counter);
166 else
167 delay = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS,
168 UINT_MAX);
166 rp->earliest_transmission 169 rp->earliest_transmission
167 = GNUNET_TIME_relative_to_absolute (delay); 170 = GNUNET_TIME_relative_to_absolute (delay);
168#if DEBUG_FS 171#if DEBUG_FS
diff --git a/src/fs/gnunet-service-fs_pr.c b/src/fs/gnunet-service-fs_pr.c
index fb4c7ec9e..37865d913 100644
--- a/src/fs/gnunet-service-fs_pr.c
+++ b/src/fs/gnunet-service-fs_pr.c
@@ -305,6 +305,10 @@ GSF_pending_request_create_ (enum GSF_PendingRequestOptions options,
305 GNUNET_h2s (query), 305 GNUNET_h2s (query),
306 type); 306 type);
307#endif 307#endif
308 GNUNET_STATISTICS_update (GSF_stats,
309 gettext_noop ("# Pending requests created"),
310 1,
311 GNUNET_NO);
308 pr = GNUNET_malloc (sizeof (struct GSF_PendingRequest)); 312 pr = GNUNET_malloc (sizeof (struct GSF_PendingRequest));
309 pr->local_result_offset = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK, 313 pr->local_result_offset = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK,
310 UINT64_MAX); 314 UINT64_MAX);
diff --git a/src/nse/test_nse.conf b/src/nse/test_nse.conf
index d8440e904..475f87eaf 100644
--- a/src/nse/test_nse.conf
+++ b/src/nse/test_nse.conf
@@ -15,8 +15,8 @@ CONFIG = $DEFAULTCONFIG
15# Overriding network settings for faster testing (do NOT use 15# Overriding network settings for faster testing (do NOT use
16# these values in production just because they are here) 16# these values in production just because they are here)
17WORKDELAY = 1 17WORKDELAY = 1
18INTERVAL = 15000 18INTERVAL = 120000
19WORKBITS = 8 19WORKBITS = 1
20 20
21HISTOGRAM = $SERVICEHOME/nse-histogram 21HISTOGRAM = $SERVICEHOME/nse-histogram
22 22
@@ -58,7 +58,7 @@ EXTERNAL_ADDRESS = 127.0.0.1
58AUTOSTART = NO 58AUTOSTART = NO
59 59
60[testing] 60[testing]
61NUM_PEERS = 50 61NUM_PEERS = 100
62WEAKRANDOM = YES 62WEAKRANDOM = YES
63TOPOLOGY = NONE 63TOPOLOGY = NONE
64CONNECT_TOPOLOGY = SMALL_WORLD_RING 64CONNECT_TOPOLOGY = SMALL_WORLD_RING
diff --git a/src/nse/test_nse_multipeer.c b/src/nse/test_nse_multipeer.c
index 97db91fd3..277f73b21 100644
--- a/src/nse/test_nse_multipeer.c
+++ b/src/nse/test_nse_multipeer.c
@@ -51,7 +51,7 @@ struct NSEPeer *peer_tail;
51/** 51/**
52 * How long do we run the test? 52 * How long do we run the test?
53 */ 53 */
54#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 30) 54#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 60)
55 55
56static int ok; 56static int ok;
57 57
@@ -270,6 +270,7 @@ check ()
270 return ok; 270 return ok;
271} 271}
272 272
273
273int 274int
274main (int argc, char *argv[]) 275main (int argc, char *argv[])
275{ 276{