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

Refactor smartlist_choose_node_by_bandwidth to be less horrible.

With this patch, I dump the old kludge of using magic negative
numbers to indicate unknown bandwidths.  I also compute each node's
weighted bandwidth exactly once, rather than computing it once in
a loop to compute the total weighted bandwidth and a second time in
a loop to find which one we picked.
parent 50aecc68
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment