#define DEFAULT_MAX_OUTSTANDING_PUTS 10
-#define DEFAULT_MAX_OUTSTANDING_FIND_PEERS 128
+#define DEFAULT_MAX_OUTSTANDING_FIND_PEERS 64
#define DEFAULT_FIND_PEER_OFFSET GNUNET_TIME_relative_divide (DEFAULT_FIND_PEER_DELAY, DEFAULT_MAX_OUTSTANDING_FIND_PEERS)
expected_connections = -1;
if ((pg != NULL) && (peers_left == 0))
{
- expected_connections = GNUNET_TESTING_connect_topology (pg, connection_topology, connect_topology_option, connect_topology_option_modifier, NULL, NULL);
+ expected_connections = GNUNET_TESTING_connect_topology (pg,
+ connection_topology,
+ connect_topology_option,
+ connect_topology_option_modifier,
+ TIMEOUT,
+ num_peers,
+ NULL, NULL);
#if VERBOSE
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Have %d expected connections\n", expected_connections);
&end_badly, "didn't generate all hostkeys within a reasonable amount of time!!!");
pg = GNUNET_TESTING_daemons_start (cfg,
- peers_left, GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, SECONDS_PER_PEER_START * num_peers), &hostkey_callback, NULL, &peers_started_callback, NULL,
- &topology_callback, NULL, NULL);
+ peers_left,
+ peers_left,
+ GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, SECONDS_PER_PEER_START * num_peers),
+ &hostkey_callback,
+ NULL,
+ &peers_started_callback,
+ NULL,
+ &topology_callback,
+ NULL,
+ NULL);
}
{
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)
&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,
+ TIMEOUT,
+ NULL, NULL,
+ &peers_started_callback,
+ NULL,
&topology_callback, NULL, NULL);
}
if ((pg != NULL)) /* Sanity check */
{
/* Connect peers in a "straight line" topology, return the number of expected connections */
- expected_connections = GNUNET_TESTING_connect_topology (pg, GNUNET_TESTING_TOPOLOGY_LINE, GNUNET_TESTING_TOPOLOGY_OPTION_ALL, 0.0, NULL, NULL);
+ expected_connections = GNUNET_TESTING_connect_topology (pg,
+ GNUNET_TESTING_TOPOLOGY_LINE,
+ GNUNET_TESTING_TOPOLOGY_OPTION_ALL,
+ 0.0,
+ TIMEOUT,
+ 2,
+ NULL,
+ NULL);
}
/* Cancel current timeout fail task */
/* Start num_peers peers, call peers_started_callback on peer start, topology_callback on peer connect */
/* Read the API documentation for other parameters! */
pg = GNUNET_TESTING_daemons_start (cfg,
- num_peers, TIMEOUT, NULL, NULL, &peers_started_callback, NULL,
- &topology_callback, NULL, NULL);
+ num_peers,
+ num_peers,
+ TIMEOUT,
+ NULL,
+ NULL,
+ &peers_started_callback,
+ NULL,
+ &topology_callback,
+ NULL,
+ NULL);
}
if ((pg != NULL)) /* Sanity check */
{
/* Connect peers in a "straight line" topology, return the number of expected connections */
- expected_connections = GNUNET_TESTING_connect_topology (pg, GNUNET_TESTING_TOPOLOGY_LINE, GNUNET_TESTING_TOPOLOGY_OPTION_ALL, 0.0, NULL, NULL);
+ expected_connections = GNUNET_TESTING_connect_topology (pg,
+ GNUNET_TESTING_TOPOLOGY_LINE,
+ GNUNET_TESTING_TOPOLOGY_OPTION_ALL,
+ 0.0,
+ TIMEOUT,
+ 12,
+ NULL, NULL);
}
/* Cancel current timeout fail task */
/* Start num_peers peers, call peers_started_callback on peer start, topology_callback on peer connect */
/* Read the API documentation for other parameters! */
pg = GNUNET_TESTING_daemons_start (cfg,
- num_peers, TIMEOUT, NULL, NULL, &peers_started_callback, NULL,
- &topology_callback, NULL, NULL);
+ num_peers,
+ 2,
+ TIMEOUT,
+ NULL,
+ NULL,
+ &peers_started_callback,
+ NULL,
+ &topology_callback,
+ NULL,
+ NULL);
}