]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Rip out more of hid_serv_acting_as_directory
authorNick Mathewson <nickm@torproject.org>
Sun, 15 May 2011 15:14:28 +0000 (11:14 -0400)
committerNick Mathewson <nickm@torproject.org>
Sun, 15 May 2011 15:17:44 +0000 (11:17 -0400)
rransom notes correctly that now that we aren't checking our HSDir
flag, we have no actual reason to check whether we are listed in the
consensus at all when determining if we should act like a hidden
service directory.

src/or/routerlist.c

index 354e026306346eae9962daeae3175a1be0b0f459..22cf87e8011c39e7e4af805dddace4700af4f033 100644 (file)
@@ -5758,8 +5758,6 @@ int
 hid_serv_acting_as_directory(void)
 {
   routerinfo_t *me = router_get_my_routerinfo();
-  networkstatus_t *c;
-  routerstatus_t *rs;
   if (!me)
     return 0;
   if (!get_options()->HidServDirectoryV2) {
@@ -5767,17 +5765,6 @@ hid_serv_acting_as_directory(void)
                       "because we have not been configured as such.");
     return 0;
   }
-  if (!(c = networkstatus_get_latest_consensus())) {
-    log_info(LD_REND, "There's no consensus, so I can't tell if I'm a hidden "
-             "service directory");
-    return 0;
-  }
-  rs = networkstatus_vote_find_entry(c, me->cache_info.identity_digest);
-  if (!rs) {
-    log_info(LD_REND, "We're not listed in the consensus, so we're not "
-             "being a hidden service directory.");
-    return 0;
-  }
   return 1;
 }