aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-10-13 14:00:22 -0400
committerNick Mathewson <nickm@torproject.org>2020-10-13 14:00:34 -0400
commitac311a38ec62e17868b484b8ace069d171c7506d (patch)
tree3fe4b4e629d4396e4e0c56cadb380824acb3c767 /src
parentc4812698c3df0bd8aa51c615b0274bbb53b9eb6c (diff)
downloadtor-ac311a38ec62e17868b484b8ace069d171c7506d.tar.gz
tor-ac311a38ec62e17868b484b8ace069d171c7506d.zip
Make "usecreatefast" always-off.
Part of #40139, where I'm removing network parameters that we shouldn't be looking at any longer.
Diffstat (limited to 'src')
-rw-r--r--src/core/or/circuitbuild.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/src/core/or/circuitbuild.c b/src/core/or/circuitbuild.c
index ab4ce9f784..3df0f9be8f 100644
--- a/src/core/or/circuitbuild.c
+++ b/src/core/or/circuitbuild.c
@@ -770,27 +770,15 @@ circuit_deliver_create_cell,(circuit_t *circ,
return -1;
}
-/** Return true iff we should send a create_fast cell to start building a given
- * circuit */
-static inline int
+/** Return true iff we should send a create_fast cell to start building a
+ * given circuit */
+static inline bool
should_use_create_fast_for_circuit(origin_circuit_t *circ)
{
- const or_options_t *options = get_options();
tor_assert(circ->cpath);
tor_assert(circ->cpath->extend_info);
- if (!circuit_has_usable_onion_key(circ)) {
- /* We don't have ntor, and we don't have or can't use TAP,
- * so our hand is forced: only a create_fast will work. */
- return 1;
- }
- if (public_server_mode(options)) {
- /* We're a server, and we have a usable onion key. We can choose.
- * Prefer to blend our circuit into the other circuits we are
- * creating on behalf of others. */
- return 0;
- }
- return networkstatus_get_param(NULL, "usecreatefast", 0, 0, 1);
+ return ! circuit_has_usable_onion_key(circ);
}
/**