diff options
-rw-r--r-- | src/rps/gnunet-service-rps.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c index 1448a046f..4a0027d72 100644 --- a/src/rps/gnunet-service-rps.c +++ b/src/rps/gnunet-service-rps.c | |||
@@ -725,6 +725,7 @@ resize_wrapper () | |||
725 | { /* Growing */ | 725 | { /* Growing */ |
726 | RPS_sampler_resize (sampler_size * 2); | 726 | RPS_sampler_resize (sampler_size * 2); |
727 | } | 727 | } |
728 | LOG (GNUNET_ERROR_TYPE_DEBUG, "sampler_size is now %u\n", sampler_size); | ||
728 | } | 729 | } |
729 | 730 | ||
730 | 731 | ||
@@ -788,7 +789,7 @@ nse_callback (void *cls, struct GNUNET_TIME_Absolute timestamp, | |||
788 | //double scale; // TODO this might go gloabal/config | 789 | //double scale; // TODO this might go gloabal/config |
789 | 790 | ||
790 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 791 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
791 | "Received a ns estimate - logest: %f, std_dev: %f (old_size: %f)\n", | 792 | "Received a ns estimate - logest: %f, std_dev: %f (old_size: %u)\n", |
792 | logestimate, std_dev, RPS_sampler_get_size()); | 793 | logestimate, std_dev, RPS_sampler_get_size()); |
793 | //scale = .01; | 794 | //scale = .01; |
794 | estimate = GNUNET_NSE_log_estimate_to_n (logestimate); | 795 | estimate = GNUNET_NSE_log_estimate_to_n (logestimate); |
@@ -796,7 +797,8 @@ nse_callback (void *cls, struct GNUNET_TIME_Absolute timestamp, | |||
796 | estimate = pow (estimate, 1./3); | 797 | estimate = pow (estimate, 1./3); |
797 | // TODO add if std_dev is a number | 798 | // TODO add if std_dev is a number |
798 | // estimate += (std_dev * scale); | 799 | // estimate += (std_dev * scale); |
799 | if ( 0 < estimate ) { | 800 | if (0 < ceil (estimate)) |
801 | { | ||
800 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Changing estimate to %f\n", estimate); | 802 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Changing estimate to %f\n", estimate); |
801 | sampler_size_est_need = estimate; | 803 | sampler_size_est_need = estimate; |
802 | } else | 804 | } else |