commit d1e8c7a60361f2553c1abb1ec1a1e6a1dbc73185
parent a5d53ce4164bd8a2070435dd7887bdfd0b5480dd
Author: David Goulet <dgoulet@torproject.org>
Date: Tue, 12 Mar 2024 12:51:18 +0000
Merge branch 'dont-require-bandwidthcapacity' into 'main'
In router_is_active, don't require non-zero bandwidthcapacity
Closes #13000 and #40917
See merge request tpo/core/tor!801
Diffstat:
1 file changed, 1 insertion(+), 16 deletions(-)
diff --git a/src/feature/dirauth/voteflags.c b/src/feature/dirauth/voteflags.c
@@ -112,8 +112,7 @@ dirserv_thinks_router_is_unreliable(time_t now,
}
/** Return 1 if <b>ri</b>'s descriptor is "active" -- running, valid,
- * not hibernating, having observed bw greater 0, and not too old. Else
- * return 0.
+ * not hibernating, and not too old. Else return 0.
*/
static int
router_is_active(const routerinfo_t *ri, const node_t *node, time_t now)
@@ -125,20 +124,6 @@ router_is_active(const routerinfo_t *ri, const node_t *node, time_t now)
if (!node->is_running || !node->is_valid || ri->is_hibernating) {
return 0;
}
- /* Only require bandwidth capacity in non-test networks, or
- * if TestingTorNetwork, and TestingMinExitFlagThreshold is non-zero */
- if (!ri->bandwidthcapacity) {
- if (get_options()->TestingTorNetwork) {
- if (dirauth_get_options()->TestingMinExitFlagThreshold > 0) {
- /* If we're in a TestingTorNetwork, and TestingMinExitFlagThreshold is,
- * then require bandwidthcapacity */
- return 0;
- }
- } else {
- /* If we're not in a TestingTorNetwork, then require bandwidthcapacity */
- return 0;
- }
- }
return 1;
}