]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Remove MIN_METHOD_FOR_CANONICAL_FAMILIES_IN_MICRODESCS
authorNick Mathewson <nickm@torproject.org>
Thu, 5 Oct 2023 12:14:36 +0000 (08:14 -0400)
committerNick Mathewson <nickm@torproject.org>
Thu, 5 Oct 2023 13:07:47 +0000 (09:07 -0400)
src/feature/dirauth/dirvote.c
src/feature/dirauth/dirvote.h

index 81d8cffd25d8b4b15b70254a9f63bef14b014a4c..fa919fbf48de8b92ed4a7dd4155df2406258336a 100644 (file)
@@ -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},
index 9faea988d0073b6cd4af51c8f02bfb62da759364..64afc2612c916aa2594578ed553d496b25584011 100644 (file)
 /** 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