- #ifdef ENABLE_MALICIOUS
- if (1 == mal_type
- || 2 == mal_type)
- {
- GNUNET_assert (1 >= portion
- && 0 < portion);
- num_mal_peers = round (portion * NUM_PEERS);
-
- if (rps_peer->index >= num_mal_peers)
- { /* It's useless to ask a malicious peer about a random sample -
- it's not sampling */
- GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 2),
- seed_peers, rps_peer);
- GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10),
- request_peers, rps_peer);
- }
- }
- #endif /* ENABLE_MALICIOUS */
-
- if (SINGLE_REQUEST == test_type)
- {
- //(void) GNUNET_RPS_request_peers (rps, 1, handle_reply, NULL);
- GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5),
- request_peers, rps_peer);
- }
- else if (DELAYED_REQUESTS == test_type)
- {
- GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5),
- request_peers, rps_peer);
- GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10),
- request_peers, rps_peer);
- }
- else if (SEED == test_type)
- {
- GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10),
- seed_peers, rps_peer);
- }
- else if (SEED_BIG == test_type)
- {
- // TODO test seeding > GNUNET_SERVER_MAX_MESSAGE_SIZE peers
- }
- else if (SINGLE_PEER_SEED == test_type)
- {
- // TODO
- }
- else if (SEED_REQUEST == test_type)
- {
- GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 2),
- seed_peers, rps_peer);
- GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 15),
- request_peers, rps_peer);
- }
- else if (REQUEST_CANCEL == test_type)
- {
- // TODO
- }