summaryrefslogtreecommitdiff
path: root/src/feature/dirparse/routerparse.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-09-30 23:42:21 -0500
committerNick Mathewson <nickm@torproject.org>2018-10-01 00:09:00 -0500
commit31008317620c26ec9925592e1f867ef03a1125c4 (patch)
tree262608b8310ed4d9f3999547f8504db58ceb4b2e /src/feature/dirparse/routerparse.c
parenta77b2e984e0781215a03c205c69441b30749ed9b (diff)
downloadtor-31008317620c26ec9925592e1f867ef03a1125c4.tar.gz
tor-31008317620c26ec9925592e1f867ef03a1125c4.zip
Remove dump_distinct_digest_count()
It was disabled-by-default for ages, and it no longer compiles. I think it's safe to call it obsolete.
Diffstat (limited to 'src/feature/dirparse/routerparse.c')
-rw-r--r--src/feature/dirparse/routerparse.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/feature/dirparse/routerparse.c b/src/feature/dirparse/routerparse.c
index b439b79de8..05013ef7f4 100644
--- a/src/feature/dirparse/routerparse.c
+++ b/src/feature/dirparse/routerparse.c
@@ -537,31 +537,6 @@ router_parse_list_from_string(const char **s, const char *eos,
return 0;
}
-/* For debugging: define to count every descriptor digest we've seen so we
- * know if we need to try harder to avoid duplicate verifies. */
-#undef COUNT_DISTINCT_DIGESTS
-
-#ifdef COUNT_DISTINCT_DIGESTS
-static digestmap_t *verified_digests = NULL;
-#endif
-
-/** Log the total count of the number of distinct router digests we've ever
- * verified. When compared to the number of times we've verified routerdesc
- * signatures <i>in toto</i>, this will tell us if we're doing too much
- * multiple-verification. */
-void
-dump_distinct_digest_count(int severity)
-{
-#ifdef COUNT_DISTINCT_DIGESTS
- if (!verified_digests)
- verified_digests = digestmap_new();
- tor_log(severity, LD_GENERAL, "%d *distinct* router digests verified",
- digestmap_size(verified_digests));
-#else /* !(defined(COUNT_DISTINCT_DIGESTS)) */
- (void)severity; /* suppress "unused parameter" warning */
-#endif /* defined(COUNT_DISTINCT_DIGESTS) */
-}
-
/** Try to find an IPv6 OR port in <b>list</b> of directory_token_t's
* with at least one argument (use GE(1) in setup). If found, store
* address and port number to <b>addr_out</b> and
@@ -1139,11 +1114,6 @@ router_parse_entry_from_string(const char *s, const char *end,
}
tok = find_by_keyword(tokens, K_ROUTER_SIGNATURE);
-#ifdef COUNT_DISTINCT_DIGESTS
- if (!verified_digests)
- verified_digests = digestmap_new();
- digestmap_set(verified_digests, signed_digest, (void*)(uintptr_t)1);
-#endif
if (!router->or_port) {
log_warn(LD_DIR,"or_port unreadable or 0. Failing.");