aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2023-10-05 08:14:36 -0400
committerNick Mathewson <nickm@torproject.org>2023-10-05 09:07:47 -0400
commita2ab949a13106fcafe1caaa6699424e53255525a (patch)
treed8e36490e53f76e74a031e998ee05600dd6bb2f6
parenta7993bbd72e44868384832af67c03595918b4bfb (diff)
downloadtor-a2ab949a13106fcafe1caaa6699424e53255525a.tar.gz
tor-a2ab949a13106fcafe1caaa6699424e53255525a.zip
Remove MIN_METHOD_FOR_CANONICAL_FAMILIES_IN_MICRODESCS
-rw-r--r--src/feature/dirauth/dirvote.c14
-rw-r--r--src/feature/dirauth/dirvote.h6
2 files changed, 4 insertions, 16 deletions
diff --git a/src/feature/dirauth/dirvote.c b/src/feature/dirauth/dirvote.c
index 81d8cffd25..fa919fbf48 100644
--- a/src/feature/dirauth/dirvote.c
+++ b/src/feature/dirauth/dirvote.c
@@ -3945,14 +3945,10 @@ dirvote_create_microdescriptor(const routerinfo_t *ri, int consensus_method)
}
if (family) {
- if (consensus_method < MIN_METHOD_FOR_CANONICAL_FAMILIES_IN_MICRODESCS) {
- smartlist_add_asprintf(chunks, "family %s\n", family);
- } else {
- const uint8_t *id = (const uint8_t *)ri->cache_info.identity_digest;
- char *canonical_family = nodefamily_canonicalize(family, id, 0);
- smartlist_add_asprintf(chunks, "family %s\n", canonical_family);
- tor_free(canonical_family);
- }
+ const uint8_t *id = (const uint8_t *)ri->cache_info.identity_digest;
+ char *canonical_family = nodefamily_canonicalize(family, id, 0);
+ smartlist_add_asprintf(chunks, "family %s\n", canonical_family);
+ tor_free(canonical_family);
}
if (summary && strcmp(summary, "reject 1-65535"))
@@ -4050,8 +4046,6 @@ static const struct consensus_method_range_t {
int high;
} microdesc_consensus_methods[] = {
{MIN_SUPPORTED_CONSENSUS_METHOD,
- MIN_METHOD_FOR_CANONICAL_FAMILIES_IN_MICRODESCS - 1},
- {MIN_METHOD_FOR_CANONICAL_FAMILIES_IN_MICRODESCS,
MIN_METHOD_FOR_UNPADDED_NTOR_KEY - 1},
{MIN_METHOD_FOR_UNPADDED_NTOR_KEY,
MAX_SUPPORTED_CONSENSUS_METHOD},
diff --git a/src/feature/dirauth/dirvote.h b/src/feature/dirauth/dirvote.h
index 9faea988d0..64afc2612c 100644
--- a/src/feature/dirauth/dirvote.h
+++ b/src/feature/dirauth/dirvote.h
@@ -55,12 +55,6 @@
/** The highest consensus method that we currently support. */
#define MAX_SUPPORTED_CONSENSUS_METHOD 34
-/**
- * Lowest consensus method where microdescriptor lines are put in canonical
- * form for improved compressibility and ease of storage. See proposal 298.
- **/
-#define MIN_METHOD_FOR_CANONICAL_FAMILIES_IN_MICRODESCS 29
-
/** Lowest consensus method where an unpadded base64 onion-key-ntor is allowed
* See #7869 */
#define MIN_METHOD_FOR_UNPADDED_NTOR_KEY 30