diff options
author | Andrea Shepard <andrea@torproject.org> | 2013-03-20 11:16:41 -0700 |
---|---|---|
committer | Andrea Shepard <andrea@torproject.org> | 2013-03-20 11:16:41 -0700 |
commit | 5c5198e713365fecf44741ae6f287c2ebdef18f6 (patch) | |
tree | f329782bff6541a16d0119106c949131db668616 /src/or/dirserv.c | |
parent | 8e29a7ae1da643197cc237ecb81096cd55913eff (diff) | |
download | tor-5c5198e713365fecf44741ae6f287c2ebdef18f6.tar.gz tor-5c5198e713365fecf44741ae6f287c2ebdef18f6.zip |
Set default minimum bandwidth for exit flag to zero for TestingTorNetwork
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r-- | src/or/dirserv.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 81f328a647..e837e4bed5 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -1894,11 +1894,17 @@ router_counts_toward_thresholds(const node_t *node, time_t now, /* Have measured bw? */ int have_mbw = dirserv_has_measured_bw(node->ri->cache_info.identity_digest); + uint64_t min_bw = ABSOLUTE_MIN_BW_VALUE_TO_CONSIDER; + const or_options_t *options = get_options(); + + if (options->TestingTorNetwork) { + min_bw = (int64_t)options->TestingMinExitFlagThreshold; + } return node->ri && router_is_active(node->ri, node, now) && !digestmap_get(omit_as_sybil, node->ri->cache_info.identity_digest) && - (dirserv_get_credible_bandwidth(node->ri) >= - ABSOLUTE_MIN_BW_VALUE_TO_CONSIDER) && (have_mbw || !require_mbw); + (dirserv_get_credible_bandwidth(node->ri) >= min_bw) && + (have_mbw || !require_mbw); } /** Look through the routerlist, the Mean Time Between Failure history, and |