projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
457d13e
)
-fix
author
Christian Grothoff
<christian@grothoff.org>
Wed, 25 Jan 2012 10:29:29 +0000
(10:29 +0000)
committer
Christian Grothoff
<christian@grothoff.org>
Wed, 25 Jan 2012 10:29:29 +0000
(10:29 +0000)
src/nse/gnunet-service-nse.c
patch
|
blob
|
history
diff --git
a/src/nse/gnunet-service-nse.c
b/src/nse/gnunet-service-nse.c
index 2b391b1c43e81945caa8ebff9d5f91d3e0ab7860..3af9bb7c726b58de2fce78f3e46ac1ea27210ae6 100644
(file)
--- a/
src/nse/gnunet-service-nse.c
+++ b/
src/nse/gnunet-service-nse.c
@@
-387,9
+387,7
@@
setup_estimate_message (struct GNUNET_NSE_ClientMessage *em)
em->timestamp = GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get ());
double se = mean - 0.332747;
nsize = log2 (GNUNET_CONTAINER_multihashmap_size (peers) + 1);
- if (em->size_estimate < nsize)
- se = nsize;
- em->size_estimate = GNUNET_hton_double (se);
+ em->size_estimate = GNUNET_hton_double (GNUNET_MAX (se, nsize));
em->std_deviation = GNUNET_hton_double (std_dev);
GNUNET_STATISTICS_set (stats, "# nodes in the network (estimate)",
(uint64_t) pow (2, mean - 1.0 / 3.0), GNUNET_NO);