Changeset a7e876d


Ignore:
Timestamp:
Oct 19, 2008 9:48:55 PM (12 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
8a756a6
Parents:
06be4515
Message:
  • FloodfillMonitor?:
    • Don't become ff if clock skew is high
    • Rebuild routerinfo immediately when ff status changes
File:
1 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/networkdb/kademlia/FloodfillMonitorJob.java

    r06be4515 ra7e876d  
    4040    public String getName() { return "Monitor the floodfill pool"; }
    4141    public void runJob() {
     42        boolean wasFF = _facade.floodfillEnabled();
    4243        boolean ff = shouldBeFloodfill();
    4344        _facade.setFloodfillEnabled(ff);
     45        if (ff != wasFF)
     46            getContext().router().rebuildRouterInfo();
    4447        if (_log.shouldLog(Log.INFO))
    4548            _log.info("Should we be floodfill? " + ff);
     
    116119        happy = happy && getContext().commSystem().countActivePeers() >= 50;
    117120        happy = happy && getContext().tunnelManager().getParticipatingCount() >= 100;
     121        happy = happy && Math.abs(getContext().clock().getOffset()) < 10*1000;
    118122        // We need an address and no introducers
    119123        if (happy) {
Note: See TracChangeset for help on using the changeset viewer.