Changeset ab40454


Ignore:
Timestamp:
Nov 3, 2009 5:38:11 PM (10 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
820c573
Parents:
a5772e6
Message:

reduce the routerinfo expiration a little

File:
1 edited

Legend:

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

    ra5772e6 rab40454  
    660660        long now = _context.clock().now();
    661661        boolean upLongEnough = _context.router().getUptime() > 60*60*1000;
    662         // Once we're over 150 routers, reduce the expiration time down from the default,
     662        // Once we're over 120 routers, reduce the expiration time down from the default,
    663663        // as a crude way of limiting memory usage.
    664664        // i.e. at 300 routers the expiration time will be about half the default, etc.
     
    674674            adjustedExpiration = Math.min(ROUTER_INFO_EXPIRATION,
    675675                                          ROUTER_INFO_EXPIRATION_MIN +
    676                                           ((ROUTER_INFO_EXPIRATION - ROUTER_INFO_EXPIRATION_MIN) * 150 / (_kb.size() + 1)));
     676                                          ((ROUTER_INFO_EXPIRATION - ROUTER_INFO_EXPIRATION_MIN) * 120 / (_kb.size() + 1)));
    677677
    678678        if (!key.equals(routerInfo.getIdentity().getHash())) {
Note: See TracChangeset for help on using the changeset viewer.