I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit e8bc0bd5 authored by zzz's avatar zzz
Browse files

Stats: randomize router count at startup also

parent bb33b358
No related branches found
No related tags found
No related merge requests found
......@@ -151,7 +151,10 @@ public class StatisticsManager implements Service {
// So that we will still get build requests
stats.setProperty("stat_uptime", "90m");
if (FloodfillNetworkDatabaseFacade.isFloodfill(_context.router().getRouterInfo())) {
stats.setProperty("netdb.knownRouters", String.valueOf(_context.netDb().getKnownRouters()));
int ri = _context.router().getUptime() > 30*60*1000 ?
_context.netDb().getKnownRouters() :
3000 + _context.random().nextInt(1000); // so it isn't obvious we restarted
stats.setProperty("netdb.knownRouters", String.valueOf(ri));
int ls = _context.router().getUptime() > 30*60*1000 ?
_context.netDb().getKnownLeaseSets() :
30 + _context.random().nextInt(40); // so it isn't obvious we restarted
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment