[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit 57558d8a88bdf53b5b936203ce0de3dd79d54127
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
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);
     }



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits