Skip to content
Snippets Groups Projects
Commit 4fa29b02 authored by juga's avatar juga
Browse files

fix: relayprioritizer: number of prioritized relays

The number of prioritized relays was set to the minimum, but in a
small testing network this could be lesser than the number of
relays in the network.
parent 0333fadc
No related branches found
No related tags found
No related merge requests found
......@@ -143,7 +143,9 @@ class RelayPrioritizer:
# Increment the number of times ``best_priority`` has been run.
self.increment_priority_lists()
# Increment the number of relays that have been "prioritized".
self.increment_priority_relays(upper_limit)
# Because in a small testing network the upper limit could be smaller
# than the number of relays in the network, use the length of the list.
self.increment_priority_relays(len(relays[0:upper_limit]))
for relay in relays[0:upper_limit]:
log.debug('Returning next relay %s with priority %f',
relay.nickname, relay.priority)
......
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