diff --git a/apps/i2psnark/java/src/org/klomp/snark/Peer.java b/apps/i2psnark/java/src/org/klomp/snark/Peer.java index ae053b8c8ac9d96a485256d7a5a3fece5560337a..73ba93280495da75b74289758e316c50ce0ec937 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/Peer.java +++ b/apps/i2psnark/java/src/org/klomp/snark/Peer.java @@ -78,7 +78,7 @@ public class Peer implements Comparable this.my_id = my_id; this.metainfo = metainfo; _id = ++__id; - //_log.debug("Creating a new peer with " + peerID.getAddress().calculateHash().toBase64(), new Exception("creating")); + //_log.debug("Creating a new peer with " + peerID.toString(), new Exception("creating")); } /** @@ -102,7 +102,7 @@ public class Peer implements Comparable this.peerID = new PeerID(id, sock.getPeerDestination()); _id = ++__id; if (_log.shouldLog(Log.DEBUG)) - _log.debug("Creating a new peer with " + peerID.getAddress().calculateHash().toBase64(), new Exception("creating " + _id)); + _log.debug("Creating a new peer with " + peerID.toString(), new Exception("creating " + _id)); } /** @@ -198,7 +198,7 @@ public class Peer implements Comparable throw new IllegalStateException("Peer already started"); if (_log.shouldLog(Log.DEBUG)) - _log.debug("Running connection to " + peerID.getAddress().calculateHash().toBase64(), new Exception("connecting")); + _log.debug("Running connection to " + peerID.toString(), new Exception("connecting")); try { // Do we need to handshake? diff --git a/apps/i2psnark/java/src/org/klomp/snark/TrackerClient.java b/apps/i2psnark/java/src/org/klomp/snark/TrackerClient.java index a1a3f4cc21a2e5c0f11952594e85e728493a96c0..89815035b4e6d1a4fa15cd9f7e8098d6877c93d2 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/TrackerClient.java +++ b/apps/i2psnark/java/src/org/klomp/snark/TrackerClient.java @@ -276,7 +276,7 @@ public class TrackerClient extends I2PAppThread // only delay if we actually make an attempt to add peer if(coordinator.addPeer(cur)) { int delay = DELAY_MUL; - delay *= ((int)cur.getPeerID().getAddress().calculateHash().toBase64().charAt(0)) % 10; + delay *= r.nextInt(10); delay += DELAY_MIN; sleptTime += delay; try { Thread.sleep(delay); } catch (InterruptedException ie) {}