static int ok;
+struct GNUNET_TIME_Relative connect_timeout;
+
+static unsigned long long connect_attempts;
+
static unsigned long long num_peers;
static unsigned int topology_connections;
GNUNET_TESTING_connect_topology (pg, connection_topology,
connect_topology_option,
connect_topology_option_modifier,
+ connect_timeout,
+ connect_attempts,
&topology_creation_finished, NULL);
#if VERBOSE > 1
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
&num_peers))
num_peers = DEFAULT_NUM_PEERS;
+ if (GNUNET_OK ==
+ GNUNET_CONFIGURATION_get_value_number (cfg, "testing", "connect_timeout",
+ &temp_settle))
+ connect_timeout =
+ GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, temp_settle);
+ else
+ {
+ GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Must provide option %s:%s!\n", "testing", "connect_timeout");
+ return;
+ }
+
+
+ if (GNUNET_OK !=
+ GNUNET_CONFIGURATION_get_value_number (cfg, "testing", "connect_attempts",
+ &connect_attempts))
+ {
+ GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Must provide option %s:%s!\n", "testing", "connect_attempts");
+ return;
+ }
+
main_cfg = cfg;
peers_left = num_peers;
GNUNET_assert (num_peers > 0 && num_peers < (unsigned int) -1);
pg = GNUNET_TESTING_daemons_start (cfg,
+ peers_left,
+ peers_left / 2,
peers_left,
timeout,
&hostkey_callback, NULL,