I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 7ff5d36f authored by zzz's avatar zzz
Browse files

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
parent 5a3eab0c
No related branches found
No related tags found
No related merge requests found
......@@ -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 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_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;
private static final int MAX_TRACKERS = 12;
......@@ -651,7 +653,7 @@ public class TrackerClient implements Runnable {
else
numwant = _util.getMaxConnections();
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());
if (!hashes.isEmpty()) {
runStarted = true;
......
......@@ -34,7 +34,8 @@ class DHTTracker {
/** stagger with other cleaners */
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 DELTA_EXPIRE_TIME = 3*60*1000;
private static final int MAX_PEERS = 2000;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment