Changeset 4ff8a53


Ignore:
Timestamp:
Sep 1, 2005 6:55:00 AM (15 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
3e51584
Parents:
ccb7343
git-author:
jrandom <jrandom> (09/01/05 06:55:00)
git-committer:
zzz <zzz@…> (09/01/05 06:55:00)
Message:

2005-09-01 jrandom

  • Don't send out a netDb store of a router if it is more than a few hours old, even if someone asked us for it.
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • history.txt

    rccb7343 r4ff8a53  
    1 $Id: history.txt,v 1.232 2005/08/29 20:59:13 jrandom Exp $
     1$Id: history.txt,v 1.233 2005/08/31 19:26:20 jrandom Exp $
     2
     32005-09-01  jrandom
     4    * Don't send out a netDb store of a router if it is more than a few hours
     5      old, even if someone asked us for it.
    26
    372005-08-31  jrandom
  • router/java/src/net/i2p/router/RouterVersion.java

    rccb7343 r4ff8a53  
    1616 */
    1717public class RouterVersion {
    18     public final static String ID = "$Revision: 1.221 $ $Date: 2005/08/29 20:59:13 $";
     18    public final static String ID = "$Revision: 1.222 $ $Date: 2005/08/31 19:20:17 $";
    1919    public final static String VERSION = "0.6.0.3";
    20     public final static long BUILD = 5;
     20    public final static long BUILD = 6;
    2121    public static void main(String args[]) {
    2222        System.out.println("I2P Router version: " + VERSION);
  • router/java/src/net/i2p/router/networkdb/HandleDatabaseLookupMessageJob.java

    rccb7343 r4ff8a53  
    4444    private final static int REPLY_TIMEOUT = 60*1000;
    4545    private final static int MESSAGE_PRIORITY = 300;
     46   
     47    /**
     48     * If a routerInfo structure isn't updated within an hour, drop it
     49     * and search for a later version.  This value should be large enough
     50     * to deal with the Router.CLOCK_FUDGE_FACTOR.
     51     */
     52    public final static long EXPIRE_DELAY = 60*60*1000;
    4653   
    4754    public HandleDatabaseLookupMessageJob(RouterContext ctx, DatabaseLookupMessage receivedMessage, RouterIdentity from, Hash fromHash) {
     
    102109        } else {
    103110            RouterInfo info = getContext().netDb().lookupRouterInfoLocally(_message.getSearchKey());
    104             if (info != null) {
     111            if ( (info != null) && (info.isCurrent(EXPIRE_DELAY)) ) {
    105112                // send that routerInfo to the _message.getFromHash peer
    106113                if (_log.shouldLog(Log.DEBUG))
  • router/java/src/net/i2p/router/networkdb/kademlia/FloodfillPeerSelector.java

    rccb7343 r4ff8a53  
    4040            _log.debug("Searching for " + maxNumRouters + " peers close to " + key + ": "
    4141                       + rv + " (not including " + peersToIgnore + ") [allHashes.size = "
    42                        + matches.size() + "]");
     42                       + matches.size() + "]", new Exception("Search by"));
    4343        return rv;
    4444    }
     
    7373            if (entry.equals(_context.routerHash()))
    7474                return;
     75            if (_context.shitlist().isShitlisted(entry))
     76                return;
    7577            RouterInfo info = _context.netDb().lookupRouterInfoLocally(entry);
    7678            if (info == null)
  • router/java/src/net/i2p/router/networkdb/kademlia/KademliaNetworkDatabaseFacade.java

    rccb7343 r4ff8a53  
    558558                _log.warn("Invalid leaseSet signature!  leaseSet = " + leaseSet);
    559559            return "Invalid leaseSet signature on " + leaseSet.getDestination().calculateHash().toBase64();
    560         } else if (leaseSet.getEarliestLeaseDate() <= _context.clock().now() - Router.CLOCK_FUDGE_FACTOR) {
     560        } else if (leaseSet.getEarliestLeaseDate() <= _context.clock().now() - 2*Router.CLOCK_FUDGE_FACTOR) {
    561561            long age = _context.clock().now() - leaseSet.getEarliestLeaseDate();
    562562            if (_log.shouldLog(Log.WARN))
     
    834834
    835835    /** smallest allowed period */
    836     private static final int MIN_PER_PEER_TIMEOUT = 2*1000;
     836    private static final int MIN_PER_PEER_TIMEOUT = 3*1000;
    837837    private static final int MAX_PER_PEER_TIMEOUT = 5*1000;
    838838   
  • router/java/src/net/i2p/router/networkdb/kademlia/SearchJob.java

    rccb7343 r4ff8a53  
    5353    private long _startedOn;
    5454   
    55     private static final int SEARCH_BREDTH = 3; // 3 peers at a time
     55    private static final int SEARCH_BREDTH = 10; // 10 peers at a time
    5656    private static final int SEARCH_PRIORITY = 400; // large because the search is probably for a real search
    5757    /** only send the 10 closest "dont tell me about" refs */
Note: See TracChangeset for help on using the changeset viewer.