summaryrefslogtreecommitdiff
path: root/src/or/rendcommon.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2016-03-11 10:40:31 -0500
committerRoger Dingledine <arma@torproject.org>2016-03-11 10:40:31 -0500
commite167910fce2b83d9de3a252cdf02cabdafced14b (patch)
tree9d8beb87b0455c32c5e79dd6d3b6e9543b748086 /src/or/rendcommon.c
parent656e23171d64885c1bea95403768386ee369e949 (diff)
downloadtor-e167910fce2b83d9de3a252cdf02cabdafced14b.tar.gz
tor-e167910fce2b83d9de3a252cdf02cabdafced14b.zip
rip out hid_serv_responsible_for_desc_id()
This simplifies relay behavior, because the relay offers the hsdir functionality independent of whether the directory authorities have decided this relay is suitable for clients to use yet. Implements ticket 18332.
Diffstat (limited to 'src/or/rendcommon.c')
-rw-r--r--src/or/rendcommon.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/or/rendcommon.c b/src/or/rendcommon.c
index 79509cbe2f..f1fb0d934c 100644
--- a/src/or/rendcommon.c
+++ b/src/or/rendcommon.c
@@ -983,29 +983,3 @@ hid_serv_acting_as_directory(void)
return 1;
}
-/** Return true if this node is responsible for storing the descriptor ID
- * in <b>query</b> and false otherwise. */
-MOCK_IMPL(int, hid_serv_responsible_for_desc_id,
- (const char *query))
-{
- const routerinfo_t *me;
- routerstatus_t *last_rs;
- const char *my_id, *last_id;
- int result;
- smartlist_t *responsible;
- if (!hid_serv_acting_as_directory())
- return 0;
- if (!(me = router_get_my_routerinfo()))
- return 0; /* This is redundant, but let's be paranoid. */
- my_id = me->cache_info.identity_digest;
- responsible = smartlist_new();
- if (hid_serv_get_responsible_directories(responsible, query) < 0) {
- smartlist_free(responsible);
- return 0;
- }
- last_rs = smartlist_get(responsible, smartlist_len(responsible)-1);
- last_id = last_rs->identity_digest;
- result = rend_id_is_in_interval(my_id, query, last_id);
- smartlist_free(responsible);
- return result;
-}