[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r12819 - gnunet/src/dht
From: |
gnunet |
Subject: |
[GNUnet-SVN] r12819 - gnunet/src/dht |
Date: |
Fri, 3 Sep 2010 17:30:05 +0200 |
Author: nevans
Date: 2010-09-03 17:30:05 +0200 (Fri, 03 Sep 2010)
New Revision: 12819
Modified:
gnunet/src/dht/gnunet-dht-driver.c
gnunet/src/dht/gnunet-service-dht.c
Log:
core request connect in addition to hello, minor driver stuff
Modified: gnunet/src/dht/gnunet-dht-driver.c
===================================================================
--- gnunet/src/dht/gnunet-dht-driver.c 2010-09-03 15:28:43 UTC (rev 12818)
+++ gnunet/src/dht/gnunet-dht-driver.c 2010-09-03 15:30:05 UTC (rev 12819)
@@ -1335,7 +1335,7 @@
if (find_peer_ctx->previous_peers == 0) /* First time, go slowly */
find_peer_ctx->total = 1;
else if (find_peer_ctx->current_peers - find_peer_ctx->previous_peers >
MAX_FIND_PEER_CUTOFF) /* Found LOTS of peers, still go slowly */
- find_peer_ctx->total = find_peer_ctx->last_sent / 2;
+ find_peer_ctx->total = find_peer_ctx->last_sent -
(find_peer_ctx->last_sent / 8);
#if USE_MIN
else if (find_peer_ctx->current_peers - find_peer_ctx->previous_peers <
MIN_FIND_PEER_CUTOFF)
find_peer_ctx->total = find_peer_ctx->last_sent * 2; /* FIXME: always
multiply by two (unless above max?) */
@@ -1464,8 +1464,8 @@
struct FindPeerContext *find_peer_context;
if (dhtlog_handle != NULL)
{
- if (settle_time >= 60 * 2)
- max = (settle_time / 60) - 2;
+ if (settle_time >= 180 * 2)
+ max = (settle_time / 180) - 2;
else
max = 1;
for (i = 1; i < max; i++)
@@ -1474,7 +1474,7 @@
topo_ctx->current_iteration = i;
topo_ctx->total_iterations = max;
//fprintf(stderr, "scheduled topology iteration in %d minutes\n", i);
- GNUNET_SCHEDULER_add_delayed(sched,
GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MINUTES, i),
&capture_current_topology, topo_ctx);
+ GNUNET_SCHEDULER_add_delayed(sched,
GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MINUTES, i * 3),
&capture_current_topology, topo_ctx);
}
topo_ctx = GNUNET_malloc(sizeof(struct TopologyIteratorContext));
topo_ctx->cont = &setup_puts_and_gets;
Modified: gnunet/src/dht/gnunet-service-dht.c
===================================================================
--- gnunet/src/dht/gnunet-service-dht.c 2010-09-03 15:28:43 UTC (rev 12818)
+++ gnunet/src/dht/gnunet-service-dht.c 2010-09-03 15:30:05 UTC (rev 12819)
@@ -67,7 +67,7 @@
*/
#define MINIMUM_PEER_THRESHOLD 20
-#define DHT_MAX_RECENT 100
+#define DHT_MAX_RECENT 1000
#define FIND_PEER_CALC_INTERVAL GNUNET_TIME_relative_multiply
(GNUNET_TIME_UNIT_SECONDS, 60)
@@ -82,9 +82,9 @@
#define DHT_DEFAULT_P2P_IMPORTANCE 0
/**
- * How long to keep recent requests arounds by default.
+ * How long to keep recent requests around by default.
*/
-#define DEFAULT_RECENT_REMOVAL
GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 60)
+#define DEFAULT_RECENT_REMOVAL
GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 30)
/**
* Default time to wait to send find peer messages sent by the dht service.
@@ -1874,7 +1874,7 @@
{
increment_stats(STAT_HELLOS_PROVIDED);
GNUNET_TRANSPORT_offer_hello(transport_handle, hello_msg);
- /* GNUNET_CORE_peer_request_connect(sched, cfg,
GNUNET_TIME_UNIT_FOREVER_REL, &new_peer, NULL, NULL); */
+ GNUNET_CORE_peer_request_connect(sched, cfg,
GNUNET_TIME_UNIT_FOREVER_REL, &new_peer, NULL, NULL);
/* peer_request_connect call causes service to segfault */
/* FIXME: Do we need this (peer_request_connect call)??? */
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r12819 - gnunet/src/dht,
gnunet <=