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

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

threshold tweaks for floodfill

parent b5bba5e3
No related branches found
No related tags found
No related merge requests found
...@@ -49,11 +49,11 @@ class FloodfillMonitorJob extends JobImpl { ...@@ -49,11 +49,11 @@ class FloodfillMonitorJob extends JobImpl {
boolean ff = shouldBeFloodfill(); boolean ff = shouldBeFloodfill();
_facade.setFloodfillEnabled(ff); _facade.setFloodfillEnabled(ff);
if (ff != wasFF) { if (ff != wasFF) {
if(ff) { if (ff) {
getContext().router().eventLog().addEvent(EventLog.BECAME_FLOODFILL); getContext().router().eventLog().addEvent(EventLog.BECAME_FLOODFILL);
} else { } else {
getContext().router().eventLog().addEvent(EventLog.NOT_FLOODFILL); getContext().router().eventLog().addEvent(EventLog.NOT_FLOODFILL);
} }
getContext().router().rebuildRouterInfo(); getContext().router().rebuildRouterInfo();
} }
if (_log.shouldLog(Log.INFO)) if (_log.shouldLog(Log.INFO))
...@@ -157,9 +157,9 @@ class FloodfillMonitorJob extends JobImpl { ...@@ -157,9 +157,9 @@ class FloodfillMonitorJob extends JobImpl {
happy = happy && lagStat.getRate(60*60*1000L).getAvgOrLifetimeAvg() < 25; happy = happy && lagStat.getRate(60*60*1000L).getAvgOrLifetimeAvg() < 25;
happy = happy && getContext().tunnelManager().getInboundBuildQueueSize() < 5; happy = happy && getContext().tunnelManager().getInboundBuildQueueSize() < 5;
// Only if we're pretty well integrated... // Only if we're pretty well integrated...
happy = happy && _facade.getKnownRouters() >= 200; happy = happy && _facade.getKnownRouters() >= 400;
happy = happy && getContext().commSystem().countActivePeers() >= 50; happy = happy && getContext().commSystem().countActivePeers() >= 50;
happy = happy && getContext().tunnelManager().getParticipatingCount() >= 35; happy = happy && getContext().tunnelManager().getParticipatingCount() >= 25;
happy = happy && Math.abs(getContext().clock().getOffset()) < 10*1000; happy = happy && Math.abs(getContext().clock().getOffset()) < 10*1000;
// We need an address and no introducers // We need an address and no introducers
if (happy) { if (happy) {
......
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