summaryrefslogtreecommitdiff
path: root/src/or/circuitstats.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/circuitstats.c')
-rw-r--r--src/or/circuitstats.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/or/circuitstats.c b/src/or/circuitstats.c
index fe6f723bd5..51d580a1a4 100644
--- a/src/or/circuitstats.c
+++ b/src/or/circuitstats.c
@@ -107,10 +107,19 @@ get_circuit_build_timeout_ms(void)
int
circuit_build_times_disabled(const or_options_t *options)
{
+ return circuit_build_times_disabled_(options, 0);
+}
+
+/** As circuit_build_times_disabled, but take options as an argument. */
+int
+circuit_build_times_disabled_(const or_options_t *options,
+ int ignore_consensus)
+{
if (unit_tests) {
return 0;
} else {
- int consensus_disabled = networkstatus_get_param(NULL, "cbtdisabled",
+ int consensus_disabled =
+ ignore_consensus ? 0 : networkstatus_get_param(NULL, "cbtdisabled",
0, 0, 1);
int config_disabled = !options->LearnCircuitBuildTimeout;
int dirauth_disabled = options->AuthoritativeDir;