diff options
author | teor <teor@riseup.net> | 2020-05-11 17:35:41 +1000 |
---|---|---|
committer | teor <teor@riseup.net> | 2020-05-18 21:53:52 +1000 |
commit | 48413dc65f0d84b9d7c9566d1ecda359a1210dda (patch) | |
tree | 0ed582d1f7c3beea51b0f6e3816527c6cf4c3068 /src/feature/nodelist | |
parent | 1ec604f0f9dc7f642e5614de4741671105d6945f (diff) | |
download | tor-48413dc65f0d84b9d7c9566d1ecda359a1210dda.tar.gz tor-48413dc65f0d84b9d7c9566d1ecda359a1210dda.zip |
nodelist: Remove the unused CRN_WEIGHT_FOR_EXIT flag
Part of 34200.
Diffstat (limited to 'src/feature/nodelist')
-rw-r--r-- | src/feature/nodelist/node_select.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/feature/nodelist/node_select.c b/src/feature/nodelist/node_select.c index 66665afbad..11abc84d4b 100644 --- a/src/feature/nodelist/node_select.c +++ b/src/feature/nodelist/node_select.c @@ -947,7 +947,6 @@ router_choose_random_node(smartlist_t *excludedsmartlist, const int need_uptime = (flags & CRN_NEED_UPTIME) != 0; const int need_capacity = (flags & CRN_NEED_CAPACITY) != 0; const int need_guard = (flags & CRN_NEED_GUARD) != 0; - const int weight_for_exit = (flags & CRN_WEIGHT_AS_EXIT) != 0; const int pref_addr = (flags & CRN_PREF_ADDR) != 0; smartlist_t *sl=smartlist_new(), @@ -956,9 +955,7 @@ router_choose_random_node(smartlist_t *excludedsmartlist, const routerinfo_t *r; bandwidth_weight_rule_t rule; - tor_assert(!(weight_for_exit && need_guard)); - rule = weight_for_exit ? WEIGHT_FOR_EXIT : - (need_guard ? WEIGHT_FOR_GUARD : WEIGHT_FOR_MID); + rule = (need_guard ? WEIGHT_FOR_GUARD : WEIGHT_FOR_MID); /* If the node_t is not found we won't be to exclude ourself but we * won't be able to pick ourself in router_choose_random_node() so |