WiP
[oweals/gnunet.git] / src / dht / test_dht_twopeer.c
index 6f3d5060df59e7560ca087d1dc629449fd7ed3c1..8c373d3652abbbb78a7eef3b9e1b1071eaebe79a 100644 (file)
@@ -220,7 +220,9 @@ get_stop_finished (void *cls, const struct GNUNET_SCHEDULER_TaskContext * tc)
                                                          &stop_retry_get, get_context);
   get_context->get_handle = GNUNET_DHT_get_start(get_context->dht_handle,
                                                 GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 5),
-                                                 0 /* fixme: use real type */, &get_context->peer->hashPubKey,
+                                                GNUNET_BLOCK_TYPE_DHT_HELLO,
+                                                &get_context->peer->hashPubKey,
+                                                 DEFAULT_GET_REPLICATION,
                                                 GNUNET_DHT_RO_NONE,
                                                 NULL, 0,
                                                 NULL, 0,
@@ -250,6 +252,7 @@ do_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext * tc)
                                                 GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 5),
                                                 GNUNET_BLOCK_TYPE_DHT_HELLO,
                                                 &get_context->peer->hashPubKey,
+                                                DEFAULT_GET_REPLICATION,
                                                 GNUNET_DHT_RO_NONE,
                                                 NULL, 0,
                                                 NULL, 0,
@@ -301,7 +304,6 @@ topology_callback (void *cls,
 
       curr_get_ctx.dht_handle = peer1dht;
       curr_get_ctx.peer = &peer2id;
-      //GNUNET_SCHEDULER_add_now (&do_get, &curr_get_ctx);
       GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 2), &do_get, &curr_get_ctx);
     }
   else if (total_connections + failed_connections == expected_connections)
@@ -316,7 +318,11 @@ connect_topology (void *cls, const struct GNUNET_SCHEDULER_TaskContext * tc)
 {
   expected_connections = -1;
   if ((pg != NULL) && (peers_left == 0))
-    expected_connections = GNUNET_TESTING_connect_topology (pg, GNUNET_TESTING_TOPOLOGY_CLIQUE, GNUNET_TESTING_TOPOLOGY_OPTION_ALL, 0.0, NULL, NULL);
+    expected_connections = GNUNET_TESTING_connect_topology (pg,
+                                                            GNUNET_TESTING_TOPOLOGY_CLIQUE,
+                                                            GNUNET_TESTING_TOPOLOGY_OPTION_ALL,
+                                                            0.0,
+                                                            TIMEOUT, 12, NULL, NULL);
 
   GNUNET_SCHEDULER_cancel (die_task);
   if (expected_connections == GNUNET_SYSERR)
@@ -407,7 +413,13 @@ run (void *cls,
                                            &end_badly, "didn't start all daemons in reasonable amount of time!!!");
 
   pg = GNUNET_TESTING_daemons_start (cfg,
-                                     num_peers, TIMEOUT, NULL, NULL, &peers_started_callback, NULL,
+                                     num_peers,
+                                     10,
+                                     num_peers,
+                                     TIMEOUT,
+                                     NULL, NULL,
+                                     &peers_started_callback,
+                                     NULL,
                                      &topology_callback, NULL, NULL);
 
 }