diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-08-09 12:59:04 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-08-09 12:59:04 -0400 |
commit | 9bfb274abb9f9e5d445a75f0b67b433be823a730 (patch) | |
tree | 4a334ce6e4786c6e9b1ab42f9217a56f906f4cbb /src/test/test.h | |
parent | 50aecc68ca33f53f7de086990d5b1856c4d40ab8 (diff) | |
download | tor-9bfb274abb9f9e5d445a75f0b67b433be823a730.tar.gz tor-9bfb274abb9f9e5d445a75f0b67b433be823a730.zip |
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.
Diffstat (limited to 'src/test/test.h')
0 files changed, 0 insertions, 0 deletions