X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Frps%2Ftest_rps.c;h=92d8c12ea5a1ae46ccbe826d75542e01def01932;hb=7a5a724a6f96baf80d2226326124aa01c58ad3fe;hp=3ef1e6611732b682e6118b676a691b0c43ef53c2;hpb=5c7f4f919d2569f49e4223d77000452dd2ec4e97;p=oweals%2Fgnunet.git diff --git a/src/rps/test_rps.c b/src/rps/test_rps.c index 3ef1e6611..92d8c12ea 100644 --- a/src/rps/test_rps.c +++ b/src/rps/test_rps.c @@ -841,6 +841,13 @@ seed_peers (void *cls) unsigned int amount; unsigned int i; + if (GNUNET_YES == in_shutdown || GNUNET_YES == post_test) + { + return; + } + + GNUNET_assert (NULL != peer->rps_handle); + // TODO if malicious don't seed mal peers amount = round (.5 * num_peers); @@ -953,6 +960,8 @@ rps_connect_complete_cb (void *cls, struct RPSPeer *rps_peer = cls; struct GNUNET_RPS_Handle *rps = ca_result; + GNUNET_assert (NULL != ca_result); + if (GNUNET_YES == in_shutdown || GNUNET_YES == post_test) { return; @@ -996,9 +1005,11 @@ rps_connect_adapter (void *cls, struct GNUNET_RPS_Handle *h; h = GNUNET_RPS_connect (cfg); + GNUNET_assert (NULL != h); if (NULL != cur_test_run.pre_test) cur_test_run.pre_test (cls, h); + GNUNET_assert (NULL != h); return h; } @@ -2839,7 +2850,7 @@ main (int argc, char *argv[]) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "This is the profiler\n"); cur_test_run.name = "test-rps-profiler"; - num_peers = 100; + num_peers = 16; mal_type = 3; cur_test_run.init_peer = profiler_init_peer; //cur_test_run.pre_test = mal_pre; @@ -2905,6 +2916,7 @@ main (int argc, char *argv[]) } ret_value = cur_test_run.eval_cb(); + if (NO_COLLECT_VIEW == cur_test_run.have_collect_view) { GNUNET_array_grow (rps_peers->cur_view,