forked from I2P_Developers/i2p.i2p
StatisticsManager: Publish dummy LS count if we just started
This commit is contained in:
@@ -151,8 +151,11 @@ 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", ""+_context.netDb().getKnownRouters());
|
stats.setProperty("netdb.knownRouters", String.valueOf(_context.netDb().getKnownRouters()));
|
||||||
stats.setProperty("netdb.knownLeaseSets", ""+_context.netDb().getKnownLeaseSets());
|
int ls = _context.router().getUptime() > 30*60*1000 ?
|
||||||
|
_context.netDb().getKnownLeaseSets() :
|
||||||
|
30 + _context.random().nextInt(40); // so it isn't obvious we restarted
|
||||||
|
stats.setProperty("netdb.knownLeaseSets", String.valueOf(ls));
|
||||||
}
|
}
|
||||||
|
|
||||||
return stats;
|
return stats;
|
||||||
|
Reference in New Issue
Block a user