Changeset d45dc8d


Ignore:
Timestamp:
Dec 6, 2015 4:52:27 PM (4 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
0558bc4
Parents:
b6e8431
Message:

NetDb?: Stub out a "family" indicator (ticket #1510)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/StatisticsManager.java

    rb6e8431 rd45dc8d  
    3131   
    3232    public final static String PROP_PUBLISH_RANKINGS = "router.publishPeerRankings";
     33    private static final String PROP_CONTACT_NAME = "netdb.contact";
     34    private static final String PROP_FAMILY_NAME = "netdb.family.name";
     35    private static final String PROP_FAMILY_KEY = "netdb.family.key";
     36    private static final String PROP_FAMILY_SIG = "netdb.family.sig";
    3337    /** enhance anonymity by only including build stats one out of this many times */
    3438    private static final int RANDOM_INCLUDE_STATS = 16;
     
    160164                     30 + _context.random().nextInt(40);   // so it isn't obvious we restarted
    161165            stats.setProperty("netdb.knownLeaseSets", String.valueOf(ls));
     166        }
     167
     168        String contact = _context.getProperty(PROP_CONTACT_NAME);
     169        if (contact != null)
     170            stats.setProperty("contact", contact);
     171        String family = _context.getProperty(PROP_FAMILY_NAME);
     172        if (family != null) {
     173            stats.setProperty("family", family);
     174            // TODO
     175            //String key = _context.getProperty(PROP_FAMILY_KEY);
     176            //if (key != null) {
     177                // get privkey
     178                // sign something
     179                // add b64 sig
     180            //}
    162181        }
    163182
Note: See TracChangeset for help on using the changeset viewer.