[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/release-0.3.5] Merge branch 'maint-0.3.3' into maint-0.3.4
commit 15e752e6b111e159b1dee3bb4692d8de3c4d1c7f
Merge: 63312e029 cbe04d455
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Thu Nov 15 16:54:56 2018 -0500
Merge branch 'maint-0.3.3' into maint-0.3.4
changes/bug24104 | 4 ++
src/or/rephist.c | 7 ++-
src/or/rephist.h | 5 +-
src/or/router.c | 24 +++++++--
src/test/log_test_helpers.c | 23 +++++++-
src/test/log_test_helpers.h | 8 ++-
src/test/test_router.c | 124 +++++++++++++++++++++++++++++++++++++++++++-
7 files changed, 179 insertions(+), 16 deletions(-)
diff --cc src/or/router.c
index 5485ec913,edaa040dd..03959e907
--- a/src/or/router.c
+++ b/src/or/router.c
@@@ -2642,13 -2544,10 +2658,13 @@@ check_descriptor_bandwidth_changed(time
return;
prev = my_ri->bandwidthcapacity;
+
+ /* Consider ourselves to have zero bandwidth if we're hibernating or
+ * shutting down. */
- cur = we_are_hibernating() ? 0 : rep_hist_bandwidth_assess();
+ cur = hibernating ? 0 : rep_hist_bandwidth_assess();
if ((prev != cur && (!prev || !cur)) ||
- cur > prev*2 ||
- cur < prev/2) {
+ cur > (prev * BANDWIDTH_CHANGE_FACTOR) ||
+ cur < (prev / BANDWIDTH_CHANGE_FACTOR) ) {
if (last_changed+MAX_BANDWIDTH_CHANGE_FREQ < now || !prev) {
log_info(LD_GENERAL,
"Measured bandwidth has changed; rebuilding descriptor.");
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits