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?) */
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++)
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;
*/
#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)
#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.
{
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)??? */
}