forked from I2P_Developers/i2p.i2p
i2psnark DHT tweaks (ticket #1281)
- Extend DHT tracker expire time from 45m to 3h - Extend DHT announce interval from 10m to 40m - Increase announces from 1 peer to 4
This commit is contained in:
@@ -82,7 +82,9 @@ public class TrackerClient implements Runnable {
|
|||||||
private final static int MAX_CONSEC_FAILS = 5; // slow down after this
|
private final static int MAX_CONSEC_FAILS = 5; // slow down after this
|
||||||
private final static int LONG_SLEEP = 30*60*1000; // sleep a while after lots of fails
|
private final static int LONG_SLEEP = 30*60*1000; // sleep a while after lots of fails
|
||||||
private final static long MIN_TRACKER_ANNOUNCE_INTERVAL = 15*60*1000;
|
private final static long MIN_TRACKER_ANNOUNCE_INTERVAL = 15*60*1000;
|
||||||
private final static long MIN_DHT_ANNOUNCE_INTERVAL = 10*60*1000;
|
private final static long MIN_DHT_ANNOUNCE_INTERVAL = 39*60*1000;
|
||||||
|
/** No guidance in BEP 5; standard practice is K (=8) */
|
||||||
|
private static final int DHT_ANNOUNCE_PEERS = 4;
|
||||||
public static final int PORT = 6881;
|
public static final int PORT = 6881;
|
||||||
private static final int MAX_TRACKERS = 12;
|
private static final int MAX_TRACKERS = 12;
|
||||||
|
|
||||||
@@ -651,7 +653,7 @@ public class TrackerClient implements Runnable {
|
|||||||
else
|
else
|
||||||
numwant = _util.getMaxConnections();
|
numwant = _util.getMaxConnections();
|
||||||
Collection<Hash> hashes = dht.getPeersAndAnnounce(snark.getInfoHash(), numwant,
|
Collection<Hash> hashes = dht.getPeersAndAnnounce(snark.getInfoHash(), numwant,
|
||||||
5*60*1000, 1, 3*60*1000,
|
5*60*1000, DHT_ANNOUNCE_PEERS, 3*60*1000,
|
||||||
coordinator.completed());
|
coordinator.completed());
|
||||||
if (!hashes.isEmpty()) {
|
if (!hashes.isEmpty()) {
|
||||||
runStarted = true;
|
runStarted = true;
|
||||||
|
@@ -34,7 +34,8 @@ class DHTTracker {
|
|||||||
|
|
||||||
/** stagger with other cleaners */
|
/** stagger with other cleaners */
|
||||||
private static final long CLEAN_TIME = 199*1000;
|
private static final long CLEAN_TIME = 199*1000;
|
||||||
private static final long MAX_EXPIRE_TIME = 45*60*1000;
|
/** no guidance in BEP 5; Vuze is 8h */
|
||||||
|
private static final long MAX_EXPIRE_TIME = 3*60*60*1000L;
|
||||||
private static final long MIN_EXPIRE_TIME = 15*60*1000;
|
private static final long MIN_EXPIRE_TIME = 15*60*1000;
|
||||||
private static final long DELTA_EXPIRE_TIME = 3*60*1000;
|
private static final long DELTA_EXPIRE_TIME = 3*60*1000;
|
||||||
private static final int MAX_PEERS = 2000;
|
private static final int MAX_PEERS = 2000;
|
||||||
|
Reference in New Issue
Block a user