summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJulius Bünger <buenger@mytum.de>2015-01-30 10:09:09 +0000
committerJulius Bünger <buenger@mytum.de>2015-01-30 10:09:09 +0000
commit30f07e795b85d2c24c2c1284a7edf57b0331ae81 (patch)
tree477e4980b628d7f5184bcb0e2719439c5462e6ed /src
parent60772fb5d21e99a356c2879313ef1c05a0e51c66 (diff)
- fixed error in peer selection, never grow smaller than 3
Diffstat (limited to 'src')
-rw-r--r--src/rps/gnunet-service-rps.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c
index 3ba80a679..297c96ba1 100644
--- a/src/rps/gnunet-service-rps.c
+++ b/src/rps/gnunet-service-rps.c
@@ -436,7 +436,7 @@ get_rand_peer_ignore_list (const struct GNUNET_PeerIdentity *peer_list,
tmp_size);
*peer = tmp_peer_list[r_index];
- if (in_arr (tmp_peer_list, list_size, peer))
+ if (in_arr (ignore_list, ignore_size, peer))
{
rem_from_list (tmp_peer_list, &tmp_size, peer);
if (0 == tmp_size)
@@ -802,7 +802,7 @@ nse_callback (void *cls, struct GNUNET_TIME_Absolute timestamp,
estimate = pow (estimate, 1.0 / 3);
// TODO add if std_dev is a number
// estimate += (std_dev * scale);
- if (0 < ceil (estimate))
+ if (2 < ceil (estimate))
{
LOG (GNUNET_ERROR_TYPE_DEBUG, "Changing estimate to %f\n", estimate);
sampler_size_est_need = estimate;