diff --git a/router/java/src/net/i2p/router/Banlist.java b/router/java/src/net/i2p/router/Banlist.java index d10186d5d1b687b4a3fd037515fe121eceaff4ad..57f31b2da4c2f802ed1918606eaffaaffc1e52ac 100644 --- a/router/java/src/net/i2p/router/Banlist.java +++ b/router/java/src/net/i2p/router/Banlist.java @@ -83,9 +83,9 @@ public class Banlist { } } catch (IllegalStateException ise) {} // next time... for (Hash peer : _toUnbanlist) { - PeerProfile prof = _context.profileOrganizer().getProfile(peer); - if (prof != null) - prof.unbanlist(); + //PeerProfile prof = _context.profileOrganizer().getProfile(peer); + //if (prof != null) + // prof.unbanlist(); _context.messageHistory().unbanlist(peer); if (_log.shouldLog(Log.INFO)) _log.info("Unbanlisting router (expired) " + peer.toBase64()); @@ -155,11 +155,11 @@ public class Banlist { e.expireOn = _context.clock().now() + BANLIST_DURATION_PARTIAL; } else { long period = BANLIST_DURATION_MS + _context.random().nextLong(BANLIST_DURATION_MS / 4); - PeerProfile prof = _context.profileOrganizer().getProfile(peer); - if (prof != null) { - period = BANLIST_DURATION_MS << prof.incrementBanlists(); - period += _context.random().nextLong(period); - } + //PeerProfile prof = _context.profileOrganizer().getProfile(peer); + //if (prof != null) { + // period = BANLIST_DURATION_MS << prof.incrementBanlists(); + // period += _context.random().nextLong(period); + //} if (period > BANLIST_DURATION_MAX) period = BANLIST_DURATION_MAX; @@ -234,11 +234,11 @@ public class Banlist { } if (fully) { - if (realUnbanlist) { - PeerProfile prof = _context.profileOrganizer().getProfile(peer); - if (prof != null) - prof.unbanlist(); - } + //if (realUnbanlist) { + // PeerProfile prof = _context.profileOrganizer().getProfile(peer); + // if (prof != null) + // prof.unbanlist(); + //} _context.messageHistory().unbanlist(peer); if (_log.shouldLog(Log.INFO) && e != null) _log.info("Unbanlisting router " + peer.toBase64() @@ -266,9 +266,9 @@ public class Banlist { } if (unbanlist) { - PeerProfile prof = _context.profileOrganizer().getProfile(peer); - if (prof != null) - prof.unbanlist(); + //PeerProfile prof = _context.profileOrganizer().getProfile(peer); + //if (prof != null) + // prof.unbanlist(); _context.messageHistory().unbanlist(peer); if (_log.shouldLog(Log.INFO)) _log.info("Unbanlisting router (expired) " + peer.toBase64()); diff --git a/router/java/src/net/i2p/router/peermanager/PeerProfile.java b/router/java/src/net/i2p/router/peermanager/PeerProfile.java index 0ec790c34b73188ddf26a623d84cc1ca42a30a96..059ac96cbf53cef08ca3ad2f85581b6ceafb8dc7 100644 --- a/router/java/src/net/i2p/router/peermanager/PeerProfile.java +++ b/router/java/src/net/i2p/router/peermanager/PeerProfile.java @@ -65,7 +65,7 @@ public class PeerProfile { // does this peer profile contain expanded data, or just the basics? private boolean _expanded; private boolean _expandedDB; - private int _consecutiveBanlists; + //private int _consecutiveBanlists; private final int _distance; /** @@ -120,8 +120,8 @@ public class PeerProfile { public boolean getIsExpanded() { return _expanded; } public boolean getIsExpandedDB() { return _expandedDB; } - public int incrementBanlists() { return _consecutiveBanlists++; } - public void unbanlist() { _consecutiveBanlists = 0; } + //public int incrementBanlists() { return _consecutiveBanlists++; } + //public void unbanlist() { _consecutiveBanlists = 0; } /** * Is this peer active at the moment (sending/receiving messages within the last