const char *emsg)
{
struct TopologyIteratorContext *topo_ctx = cls;
+ GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "log_topology_cb\n");
if ((first != NULL) && (second != NULL))
{
/* GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "According to CORE, peer %s is connected to %s\n", GNUNET_i2s(first), GNUNET_h2s(&second->hashPubKey));*/
{
struct TopologyIteratorContext *topo_ctx = cls;
dhtlog_handle->insert_topology(0);
+ GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "Called capture_current_topology\n");
GNUNET_TESTING_get_topology (pg, &log_topology_cb, topo_ctx);
}
#if HAVE_MALICIOUS
if (GNUNET_YES == malicious_after_settle)
+ {
+ GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "calling setup_malicious_peers\n");
GNUNET_SCHEDULER_add_now(&setup_malicious_peers, NULL);
+ }
#endif
}
}
int remember[num_puts][num_peers];
memset(&remember, 0, sizeof(int) * num_puts * num_peers);
#endif
+ GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "in setup_puts_and_gets\n");
known_keys = GNUNET_malloc(sizeof(GNUNET_HashCode) * num_puts);
for (i = 0; i < num_puts; i++)
{
int max;
struct TopologyIteratorContext *topo_ctx;
struct FindPeerContext *find_peer_context;
+ GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "In continue_puts_and_gets, dhtlog_handle %s\n", dhtlog_handle);
if (dhtlog_handle != NULL)
{
if (settle_time >= 180 * 2)
topo_ctx = GNUNET_malloc(sizeof(struct TopologyIteratorContext));
topo_ctx->cont = &setup_puts_and_gets;
topo_ctx->peers_seen = GNUNET_CONTAINER_multihashmap_create(num_peers);
+ GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "setting setup_puts_and_gets for %d seconds in the future\n", settle_time + 90);
GNUNET_SCHEDULER_add_delayed(GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, (settle_time + 90)), &capture_current_topology, topo_ctx);
}
else
struct GNUNET_TESTING_Daemon *temp_daemon;
curr_distance = 0;
+ GNUNET_assert (bloom != NULL);
if (GNUNET_YES == malicious_sybil)
{
{
temp_daemon = GNUNET_TESTING_daemon_get(pg, i);
/* Check if this peer matches the bloomfilter */
- if (GNUNET_YES == GNUNET_CONTAINER_bloomfilter_test (bloom, &temp_daemon->id.hashPubKey))
+ if ((GNUNET_NO == GNUNET_TESTING_daemon_running(temp_daemon)) || (GNUNET_YES == GNUNET_CONTAINER_bloomfilter_test (bloom, &temp_daemon->id.hashPubKey)))
continue;
bits_match = GNUNET_CRYPTO_hash_matching_bits (&temp_daemon->id.hashPubKey, &sybil_target);
if ((dhtlog_handle != NULL) && (settle_time > 0))
{
topo_ctx = GNUNET_malloc(sizeof(struct TopologyIteratorContext));
+ GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "Setting continue gets and puts as topo_cont\n");
topo_ctx->cont = &continue_puts_and_gets;
topo_ctx->peers_seen = GNUNET_CONTAINER_multihashmap_create(num_peers);
GNUNET_SCHEDULER_add_now(&capture_current_topology, topo_ctx);
}
+ else
+ GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "For some reason, NOT scheduling final topology capture (settle_time %d, dhtlog_handle %s)!\n", settle_time, dhtlog_handle);
}
else if (total_connections + failed_connections == expected_connections)
{
malicious_sybil = GNUNET_YES;
}
- if ((malicious_droppers > 0) || (malicious_getters > 0) || (malicious_putters > 0))
- {
- /* Create the bloomfilter for choosing which peers to set malicious */
- malicious_bloom = GNUNET_CONTAINER_bloomfilter_init (NULL, DHT_BLOOM_SIZE, DHT_BLOOM_K);
- }
+ /* Create the bloomfilter for choosing which peers to set malicious */
+ malicious_bloom = GNUNET_CONTAINER_bloomfilter_init (NULL, DHT_BLOOM_SIZE, DHT_BLOOM_K);
/* The normal behavior of the DHT is to do find peer requests
* on its own. Only if this is explicitly turned off should