- struct GNUNET_CONFIGURATION_Handle *testing_cfg;
- unsigned long long total_peers;
-
- ok = 1;
- testing_cfg = GNUNET_CONFIGURATION_create();
- GNUNET_assert(GNUNET_OK == GNUNET_CONFIGURATION_load(testing_cfg, cfgfile));
-
-#if VERBOSE
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting daemons.\n");
- GNUNET_CONFIGURATION_set_value_string (testing_cfg,
- "testing",
- "use_progressbars",
- "YES");
-#endif
- if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_number (testing_cfg,
- "testing",
- "num_peers",
- &total_peers))
- total_peers = NUM_PEERS;
-
- peers_left = total_peers;
- num_peers = peers_left;
- pg = GNUNET_TESTING_peergroup_start(testing_cfg,
- peers_left,
- TIMEOUT,
- &connect_cb,
- &my_cb, NULL,
- NULL);
- GNUNET_assert (pg != NULL);
- GNUNET_SCHEDULER_add_delayed (TIMEOUT, &shutdown_task, NULL);