Commit eae15aa2 authored by Matt Traudt's avatar Matt Traudt Committed by Matt Traudt
Browse files

Fix how freshness reduction factor is applied

Even after thinking about it for a few minutes and triple checking I was
thinking in the correct direction, I still managed to get it backwards.
parent a65bf32f
......@@ -85,7 +85,7 @@ class RelayPrioritizer:
'%s', result.type.value,
result.freshness_reduction_factor * 100,
relay.nickname)
freshness *= result.freshness_reduction_factor
freshness *= max(1.0-result.freshness_reduction_factor, 0)
priority += freshness
relay.priority = priority
# Sort the relays by their priority, with the smallest (best) priority
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment