Remove networkstatus_nickname_is_unnamed()

This commit is contained in:
Neel Chauhan 2017-09-09 17:12:37 -04:00 committed by Nick Mathewson
parent 4ace1b96ac
commit 42b5e3cbb7
3 changed files with 0 additions and 19 deletions

View File

@ -804,16 +804,6 @@ networkstatus_get_router_digest_by_nickname(const char *nickname)
return strmap_get_lc(named_server_map, nickname);
}
/** Return true iff <b>nickname</b> is disallowed from being the nickname
* of any server. */
int
networkstatus_nickname_is_unnamed(const char *nickname)
{
if (!unnamed_server_map)
return 0;
return strmap_get_lc(unnamed_server_map, nickname) != NULL;
}
/** How frequently do directory authorities re-download fresh networkstatus
* documents? */
#define AUTHORITY_NS_CACHE_INTERVAL (10*60)

View File

@ -63,7 +63,6 @@ MOCK_DECL(routerstatus_t *,
router_get_mutable_consensus_status_by_descriptor_digest,
(networkstatus_t *consensus, const char *digest));
const char *networkstatus_get_router_digest_by_nickname(const char *nickname);
int networkstatus_nickname_is_unnamed(const char *nickname);
int we_want_to_fetch_flavor(const or_options_t *options, int flavor);
int we_want_to_fetch_unknown_auth_certs(const or_options_t *options);
void networkstatus_consensus_download_failed(int status_code,

View File

@ -859,14 +859,6 @@ node_get_by_nickname,(const char *nickname, unsigned flags))
return node_get_by_id(named_id);
}
/* Is it marked as owned-by-someone-else? */
if (networkstatus_nickname_is_unnamed(nickname)) {
log_info(LD_GENERAL, "The name %s is listed as Unnamed: there is some "
"router that holds it, but not one listed in the current "
"consensus.", escaped(nickname));
return NULL;
}
/* Okay, so the name is not canonical for anybody. */
{
smartlist_t *matches = smartlist_new();