This commit is contained in:
zzz
2011-12-23 16:52:04 +00:00
parent bbcd6243e7
commit ebad5ad61c
3 changed files with 8 additions and 5 deletions

View File

@@ -12,6 +12,7 @@ package net.i2p.router;
* Defines the criteria for selecting a set of peers for use when searching the
* PeerManager
*
* Only used by PeerTestJob, which may not have a point.
*/
public class PeerSelectionCriteria {
/** The peers will be used in a tunnel */

View File

@@ -822,10 +822,10 @@ public class KademliaNetworkDatabaseFacade extends NetworkDatabaseFacade {
if (err != null)
throw new IllegalArgumentException("Invalid store attempt - " + err);
if (_log.shouldLog(Log.DEBUG))
_log.debug("RouterInfo " + key.toBase64() + " is stored with "
+ routerInfo.getOptions().size() + " options on "
+ new Date(routerInfo.getPublished()));
//if (_log.shouldLog(Log.DEBUG))
// _log.debug("RouterInfo " + key.toBase64() + " is stored with "
// + routerInfo.getOptions().size() + " options on "
// + new Date(routerInfo.getPublished()));
_context.peerManager().setCapabilities(key, routerInfo.getCapabilities());
_ds.put(key, routerInfo, persist);

View File

@@ -25,6 +25,7 @@ import net.i2p.util.Log;
* selection to the peer manager and tests the peer by sending it a useless
* database store message
*
* TODO - What's the point? Disable this? See also notes in PeerManager.selectPeers()
*/
public class PeerTestJob extends JobImpl {
private final Log _log;
@@ -65,7 +66,8 @@ public class PeerTestJob extends JobImpl {
_log.info("Stop testing peers");
}
public String getName() { return "Initiate some peer tests"; }
public String getName() { return "Peer test start"; }
public void runJob() {
if (!_keepTesting) return;
Set peers = selectPeersToTest();