Changeset ec94a6e


Ignore:
Timestamp:
Dec 1, 2016 2:33:26 PM (4 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
5b31540
Parents:
04321e6
Message:

NetDb?: Peer selection tweaks

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • history.txt

    r04321e6 rec94a6e  
     12016-12-01 zzz
     2 * NetDb: Peer selection tweaks
     3
    142016-11-27 zzz
    2  * NetDb: Add same-port check in peer selector
     5 * NetDb:
     6   - Add same-port check in peer selector
     7   - Add MTU, SSU caps, IPv6 prefix, and cost lookups
    38
    492016-11-26 zzz
  • router/java/src/net/i2p/router/RouterVersion.java

    r04321e6 rec94a6e  
    1919    public final static String ID = "Monotone";
    2020    public final static String VERSION = CoreVersion.VERSION;
    21     public final static long BUILD = 12;
     21    public final static long BUILD = 13;
    2222
    2323    /** for example "-test" */
  • router/java/src/net/i2p/router/networkdb/kademlia/FloodfillPeerSelector.java

    r04321e6 rec94a6e  
    172172    private static final int NO_FAIL_LOOKUP_GOOD = NO_FAIL_LOOKUP_OK * 3;
    173173    private static final int MAX_GOOD_RESP_TIME = 5*1000;
    174     private static final long HEARD_AGE = 48*60*60*1000L;
     174    // TODO we need better tracking of floodfill first-heard-about times
     175    // before we can do this. Old profiles get deleted.
     176    //private static final long HEARD_AGE = 48*60*60*1000L;
     177    private static final long HEARD_AGE = 60*60*1000L;
    175178    private static final long INSTALL_AGE = HEARD_AGE + (60*60*1000L);
    176179
  • router/java/src/net/i2p/router/networkdb/kademlia/IterativeSearchJob.java

    r04321e6 rec94a6e  
    8484    private static final int TOTAL_SEARCH_LIMIT_WHEN_FF = 3;
    8585    /** Extra peers to get from peer selector, as we may discard some before querying */
    86     private static final int EXTRA_PEERS = 2;
     86    private static final int EXTRA_PEERS = 1;
    8787    private static final int IP_CLOSE_BYTES = 3;
    8888    /** TOTAL_SEARCH_LIMIT * SINGLE_SEARCH_TIME, plus some extra */
  • router/java/src/net/i2p/router/peermanager/ProfileOrganizer.java

    r04321e6 rec94a6e  
    12471247    private void locked_selectPeers(Map<Hash, PeerProfile> peers, int howMany, Set<Hash> toExclude, Set<Hash> matches, int mask) {
    12481248        List<Hash> all = new ArrayList<Hash>(peers.keySet());
    1249         MaskedIPSet IPSet = new MaskedIPSet(8);
     1249        MaskedIPSet IPSet = new MaskedIPSet(16);
    12501250        // use RandomIterator to avoid shuffling the whole thing
    12511251        for (Iterator<Hash> iter = new RandomIterator<Hash>(all); (matches.size() < howMany) && iter.hasNext(); ) {
  • router/java/src/net/i2p/router/util/MaskedIPSet.java

    r04321e6 rec94a6e  
    8282            if (port > 0)
    8383                add("p" + port);
     84            if (pa.getCost() == 2 && "NTCP".equals(pa.getTransportStyle()))
     85                add("=cost2");
    8486        }
    8587        String family = pinfo.getOption("family");
Note: See TracChangeset for help on using the changeset viewer.