diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-12-08 12:47:23 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-12-08 12:47:23 +0000 |
commit | 5cae9ea1a811e1761cf05ba058c3067d8344bea6 (patch) | |
tree | c1f110a858b434266c920950f75147f6e73659e0 /src/nse | |
parent | 56223c1410a85b89b361de35ed065e54b8683b5d (diff) | |
download | gnunet-5cae9ea1a811e1761cf05ba058c3067d8344bea6.tar.gz gnunet-5cae9ea1a811e1761cf05ba058c3067d8344bea6.zip |
-add logging for randomized delays
Diffstat (limited to 'src/nse')
-rw-r--r-- | src/nse/gnunet-service-nse.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nse/gnunet-service-nse.c b/src/nse/gnunet-service-nse.c index ef9e474c7..06b459beb 100644 --- a/src/nse/gnunet-service-nse.c +++ b/src/nse/gnunet-service-nse.c | |||
@@ -438,6 +438,11 @@ get_delay_randomization (uint32_t matching_bits) | |||
438 | return GNUNET_TIME_UNIT_ZERO; | 438 | return GNUNET_TIME_UNIT_ZERO; |
439 | d = get_matching_bits_delay (matching_bits - 1); | 439 | d = get_matching_bits_delay (matching_bits - 1); |
440 | i = (uint32_t) (d / (double) (hop_count_max + 1)); | 440 | i = (uint32_t) (d / (double) (hop_count_max + 1)); |
441 | #if DEBUG_NSE | ||
442 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
443 | "Randomizing flood using latencies up to %u ms\n", | ||
444 | (unsigned int) i); | ||
445 | #endif | ||
441 | ret.rel_value = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, i + 1); | 446 | ret.rel_value = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, i + 1); |
442 | return ret; | 447 | return ret; |
443 | #else | 448 | #else |