diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/or/config.c | 1 | ||||
-rw-r--r-- | src/or/dirserv.c | 3 | ||||
-rw-r--r-- | src/or/or.h | 3 |
3 files changed, 7 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c index 2b8eab7d6..9e2230e76 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -341,6 +341,7 @@ static config_var_t option_vars_[] = { V(PerConnBWRate, MEMUNIT, "0"), V(PidFile, STRING, NULL), V(TestingTorNetwork, BOOL, "0"), + V(TestingMinFastFlagThreshold, MEMUNIT, "0"), V(OptimisticData, AUTOBOOL, "auto"), V(PortForwarding, BOOL, "0"), V(PortForwardingHelper, FILENAME, "tor-fw-helper"), diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 8e8f79a17..81f328a64 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -2005,6 +2005,9 @@ dirserv_compute_performance_thresholds(routerlist_t *rl, ABSOLUTE_MIN_VALUE_FOR_FAST_FLAG, ABSOLUTE_MIN_VALUE_FOR_FAST_FLAG, INT32_MAX); + if (options->TestingTorNetwork) { + min_fast = (int32_t)options->TestingMinFastFlagThreshold; + } max_fast = networkstatus_get_param(NULL, "FastFlagMaxThreshold", INT32_MAX, min_fast, INT32_MAX); if (fast_bandwidth < (uint32_t)min_fast) diff --git a/src/or/or.h b/src/or/or.h index 67315522e..2b0102de3 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -3910,6 +3910,9 @@ typedef struct { * of certain configuration options. */ int TestingTorNetwork; + /** Minimum value for the Fast flag threshold on testing networks. */ + uint64_t TestingMinFastFlagThreshold; + /** If true, and we have GeoIP data, and we're a bridge, keep a per-country * count of how many client addresses have contacted us so that we can help * the bridge authority guess which countries have blocked access to us. */ |