forked from I2P_Developers/i2p.i2p
Stats: randomize router count at startup also
This commit is contained in:
@ -151,7 +151,10 @@ public class StatisticsManager implements Service {
|
|||||||
// So that we will still get build requests
|
// So that we will still get build requests
|
||||||
stats.setProperty("stat_uptime", "90m");
|
stats.setProperty("stat_uptime", "90m");
|
||||||
if (FloodfillNetworkDatabaseFacade.isFloodfill(_context.router().getRouterInfo())) {
|
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 ?
|
int ls = _context.router().getUptime() > 30*60*1000 ?
|
||||||
_context.netDb().getKnownLeaseSets() :
|
_context.netDb().getKnownLeaseSets() :
|
||||||
30 + _context.random().nextInt(40); // so it isn't obvious we restarted
|
30 + _context.random().nextInt(40); // so it isn't obvious we restarted
|
||||||
|
Reference in New Issue
Block a user