mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-11 21:23:35 +01:00
01e984870a
Back in 0.2.4.3-alpha (e106812a77
), when we switched from using
double to using uint64 for selecting by bandwidth, I got the math
wrong: I should have used llround(x), or (uint64_t)(x+0.5), but
instead I wrote llround(x+0.5). That means we would always round
up, rather than rounding to the closest integer
Fixes bug 23318; bugfix on 0.2.4.3-alpha.
8 lines
445 B
Plaintext
8 lines
445 B
Plaintext
o Minor bugfixes (path selection):
|
|
- When selecting relays by bandwidth, avoid a rounding error that
|
|
could sometimes cause load to be imbalanced incorrectly. Previously,
|
|
we would always round upwards; now, we round towards the nearest
|
|
integer. This had the biggest effect when a relay's weight adjustments
|
|
should have given it weight 0, but it got weight 1 instead.
|
|
Fixes bug 23318; bugfix on 0.2.4.3-alpha.
|