From d45dc8d0f34c0f89bdd86bb7102ee7156a14909a Mon Sep 17 00:00:00 2001 From: zzz <zzz@mail.i2p> Date: Sun, 6 Dec 2015 16:52:27 +0000 Subject: [PATCH] NetDb: Stub out a "family" indicator (ticket #1510) --- .../src/net/i2p/router/StatisticsManager.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/router/java/src/net/i2p/router/StatisticsManager.java b/router/java/src/net/i2p/router/StatisticsManager.java index 30e063b7ba..74dae778aa 100644 --- a/router/java/src/net/i2p/router/StatisticsManager.java +++ b/router/java/src/net/i2p/router/StatisticsManager.java @@ -30,6 +30,10 @@ public class StatisticsManager implements Service { private final RouterContext _context; public final static String PROP_PUBLISH_RANKINGS = "router.publishPeerRankings"; + private static final String PROP_CONTACT_NAME = "netdb.contact"; + private static final String PROP_FAMILY_NAME = "netdb.family.name"; + private static final String PROP_FAMILY_KEY = "netdb.family.key"; + private static final String PROP_FAMILY_SIG = "netdb.family.sig"; /** enhance anonymity by only including build stats one out of this many times */ private static final int RANDOM_INCLUDE_STATS = 16; @@ -161,6 +165,21 @@ public class StatisticsManager implements Service { stats.setProperty("netdb.knownLeaseSets", String.valueOf(ls)); } + String contact = _context.getProperty(PROP_CONTACT_NAME); + if (contact != null) + stats.setProperty("contact", contact); + String family = _context.getProperty(PROP_FAMILY_NAME); + if (family != null) { + stats.setProperty("family", family); + // TODO + //String key = _context.getProperty(PROP_FAMILY_KEY); + //if (key != null) { + // get privkey + // sign something + // add b64 sig + //} + } + return stats; } -- GitLab