From: Nathan S. Evans Date: Tue, 25 Jan 2011 10:43:35 +0000 (+0000) Subject: adjust bloomfilter size based on number of malicious peers X-Git-Tag: initial-import-from-subversion-38251~19256 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=fdd7f520827b1ea211e3d97a53b625e3d2ea1837;p=oweals%2Fgnunet.git adjust bloomfilter size based on number of malicious peers --- diff --git a/src/dht/gnunet-dht-driver.c b/src/dht/gnunet-dht-driver.c index 1978d1caf..456f19c3a 100644 --- a/src/dht/gnunet-dht-driver.c +++ b/src/dht/gnunet-dht-driver.c @@ -3077,7 +3077,8 @@ run (void *cls, } /* Create the bloomfilter for choosing which peers to set malicious */ - malicious_bloom = GNUNET_CONTAINER_bloomfilter_init (NULL, DHT_BLOOM_SIZE * 10, DHT_BLOOM_K); + if (malicious_droppers > 0) + malicious_bloom = GNUNET_CONTAINER_bloomfilter_init (NULL, DHT_BLOOM_K * malicious_droppers, 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