commit 48413dc65f0d84b9d7c9566d1ecda359a1210dda Author: teor teor@riseup.net Date: Mon May 11 17:35:41 2020 +1000
nodelist: Remove the unused CRN_WEIGHT_FOR_EXIT flag
Part of 34200. --- src/feature/nodelist/node_select.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/feature/nodelist/node_select.c b/src/feature/nodelist/node_select.c index 66665afba..11abc84d4 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