[tor-commits] [onionoo/master] Remove the $ from family fingerprints.

karsten at torproject.org karsten at torproject.org
Wed Dec 20 16:15:25 UTC 2017


commit 57558d8a88bdf53b5b936203ce0de3dd79d54127
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date:   Wed Oct 18 10:33:00 2017 +0200

    Remove the $ from family fingerprints.
    
    Relays include the $ in fingerprints that they report in their family
    line. We remove that $ when computing effective and extended families
    and add it back later when writing details documents. With this change
    we're taking out that last step.
    
    Implements #22261.
---
 .../org/torproject/onionoo/writer/DetailsDocumentWriter.java   | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/src/main/java/org/torproject/onionoo/writer/DetailsDocumentWriter.java b/src/main/java/org/torproject/onionoo/writer/DetailsDocumentWriter.java
index 1b53ffe..7de83f4 100644
--- a/src/main/java/org/torproject/onionoo/writer/DetailsDocumentWriter.java
+++ b/src/main/java/org/torproject/onionoo/writer/DetailsDocumentWriter.java
@@ -119,11 +119,7 @@ public class DetailsDocumentWriter implements DocumentWriter {
         && !detailsStatus.getAllegedFamily().isEmpty()) {
       SortedSet<String> allegedFamily = new TreeSet<>();
       for (String familyMember : detailsStatus.getAllegedFamily()) {
-        if (familyMember.length() >= 40) {
-          allegedFamily.add("$" + familyMember);
-        } else {
-          allegedFamily.add(familyMember);
-        }
+        allegedFamily.add(familyMember);
       }
       detailsDocument.setAllegedFamily(allegedFamily);
     }
@@ -131,7 +127,7 @@ public class DetailsDocumentWriter implements DocumentWriter {
         && !detailsStatus.getEffectiveFamily().isEmpty()) {
       SortedSet<String> effectiveFamily = new TreeSet<>();
       for (String familyMember : detailsStatus.getEffectiveFamily()) {
-        effectiveFamily.add("$" + familyMember);
+        effectiveFamily.add(familyMember);
       }
       detailsDocument.setEffectiveFamily(effectiveFamily);
     }
@@ -139,7 +135,7 @@ public class DetailsDocumentWriter implements DocumentWriter {
         && !detailsStatus.getIndirectFamily().isEmpty()) {
       SortedSet<String> indirectFamily = new TreeSet<>();
       for (String familyMember : detailsStatus.getIndirectFamily()) {
-        indirectFamily.add("$" + familyMember);
+        indirectFamily.add(familyMember);
       }
       detailsDocument.setIndirectFamily(indirectFamily);
     }





More information about the tor-commits mailing list