Skip to content
Snippets Groups Projects
Commit d888a821 authored by Nick Mathewson's avatar Nick Mathewson :game_die:
Browse files

Fix a bug in reading CircPriorityHalflife from consensus

When you mean (a=b(c,d)) >= 0, you had better not say (a=b(c,d)>=0).
We did the latter, and so whenever CircPriorityHalflife was in the
consensus, it was treated as having a value of 1 msec (that is,
boolean true).
parent 8aec982f
No related branches found
No related tags found
No related merge requests found
o Major bugfixes:
- Fix a stupid parenthesization error that made every possible value
of CircPriorityHalflifeMsec get treated as "1 msec". Bugfix on
0.2.2.7-alpha.
......@@ -1865,7 +1865,7 @@ cell_ewma_set_scale_factor(or_options_t *options, networkstatus_t *consensus)
source = "CircuitPriorityHalflife in configuration";
} else if (consensus &&
(halflife_ms = networkstatus_get_param(
consensus, "CircPriorityHalflifeMsec", -1) >= 0)) {
consensus, "CircPriorityHalflifeMsec", -1)) >= 0) {
halflife = ((double)halflife_ms)/1000.0;
source = "CircPriorityHalflifeMsec in consensus";
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment