diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-09-27 11:54:36 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-02-13 14:44:43 -0500 |
commit | 8b9a2cb68b290e550695124d7ef0511225b451d5 (patch) | |
tree | 13c3ce9603acf7f1168221df432479097fbfd3ea /src/or/circuitlist.h | |
parent | 7f6aa780e3183f34b2fa771e17813018e6b28115 (diff) | |
download | tor-8b9a2cb68b290e550695124d7ef0511225b451d5.tar.gz tor-8b9a2cb68b290e550695124d7ef0511225b451d5.zip |
Faster circuit_get_by_rend_token_and_purpose()
On busy servers, this function takes up something like 3-7% in
different profiles, and gets invoked every time we need to participate
as the midpoint in a hidden service.
So maybe walking through a linked list of all the circuits here wasn't
a good idea.
Diffstat (limited to 'src/or/circuitlist.h')
-rw-r--r-- | src/or/circuitlist.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/circuitlist.h b/src/or/circuitlist.h index 874f68cd22..d8c107f80a 100644 --- a/src/or/circuitlist.h +++ b/src/or/circuitlist.h @@ -43,6 +43,8 @@ origin_circuit_t *circuit_get_next_by_pk_and_purpose(origin_circuit_t *start, const char *digest, uint8_t purpose); or_circuit_t *circuit_get_rendezvous(const char *cookie); or_circuit_t *circuit_get_intro_point(const char *digest); +void circuit_set_rendezvous_cookie(or_circuit_t *circ, const uint8_t *cookie); +void circuit_set_intro_point_digest(or_circuit_t *circ, const uint8_t *digest); origin_circuit_t *circuit_find_to_cannibalize(uint8_t purpose, extend_info_t *info, int flags); void circuit_mark_all_unused_circs(void); |