aboutsummaryrefslogtreecommitdiff
path: root/src/or/routerlist.c
diff options
context:
space:
mode:
authorMike Perry <mikeperry-git@fscked.org>2010-02-14 14:45:45 -0800
committerMike Perry <mikeperry-git@fscked.org>2010-02-22 16:52:11 -0800
commit245be159afa206676b05b9b5d5a11aa1f6b25bd7 (patch)
tree13bb46fe9314bbf39ff7f4e66e0dc47f3a8b66c8 /src/or/routerlist.c
parent5d4f5ef07d8e28018e1520d0cc413a75092a9304 (diff)
downloadtor-245be159afa206676b05b9b5d5a11aa1f6b25bd7.tar.gz
tor-245be159afa206676b05b9b5d5a11aa1f6b25bd7.zip
Always weight routers by bandwidth.
Also always predict that we need a high capacity circuit or internal circuit.
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r--src/or/routerlist.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 6cd8b6d83b..80229f2141 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -2070,10 +2070,8 @@ router_choose_random_node(smartlist_t *excludedsmartlist,
if (excludedset)
routerset_subtract_routers(sl,excludedset);
- if (need_capacity || need_guard)
- choice = routerlist_sl_choose_by_bandwidth(sl, rule);
- else
- choice = smartlist_choose(sl);
+ // Always weight by bandwidth
+ choice = routerlist_sl_choose_by_bandwidth(sl, rule);
smartlist_free(sl);
if (!choice && (need_uptime || need_capacity || need_guard)) {