Changeset 7175b1c


Ignore:
Timestamp:
Nov 7, 2015 2:22:17 AM (5 years ago)
Author:
zab2 <zab2@…>
Branches:
master
Children:
9f0f1f5
Parents:
ca4642e
Message:

Make the search limit configurable

File:
1 edited

Legend:

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

    rca4642e r7175b1c  
    126126        _rkey = ctx.routingKeyGenerator().getRoutingKey(key);
    127127        _toTry = new TreeSet<Hash>(new XORComparator<Hash>(_rkey));
    128         _totalSearchLimit = (facade.floodfillEnabled() && ctx.router().getUptime() > 30*60*1000) ?
     128        int totalSearchLimit = (facade.floodfillEnabled() && ctx.router().getUptime() > 30*60*1000) ?
    129129                            TOTAL_SEARCH_LIMIT_WHEN_FF : TOTAL_SEARCH_LIMIT;
     130        _totalSearchLimit = ctx.getProperty("netdb.searchLimit", totalSearchLimit);
    130131        _unheardFrom = new HashSet<Hash>(CONCURRENT_SEARCHES);
    131132        _failedPeers = new HashSet<Hash>(_totalSearchLimit);
Note: See TracChangeset for help on using the changeset viewer.