From 74a5abbc11a8431f5d59c8f2fa9e15fe74b821a1 Mon Sep 17 00:00:00 2001
From: zzz <zzz@mail.i2p>
Date: Sun, 1 Jun 2008 20:34:20 +0000
Subject: [PATCH]     * ProfileOrganizer: Restrict !isSelectable() (i.e.
 shitlisted) peers from the High Capacity tier,       not just the Fast tier,
 since we don't use them for tunnels anyway

---
 .../net/i2p/router/peermanager/ProfileOrganizer.java   | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/router/java/src/net/i2p/router/peermanager/ProfileOrganizer.java b/router/java/src/net/i2p/router/peermanager/ProfileOrganizer.java
index 85e22bdd92..5ad8c64c0e 100644
--- a/router/java/src/net/i2p/router/peermanager/ProfileOrganizer.java
+++ b/router/java/src/net/i2p/router/peermanager/ProfileOrganizer.java
@@ -1025,15 +1025,15 @@ public class ProfileOrganizer {
             
             _notFailingPeers.put(profile.getPeer(), profile);
             _notFailingPeersList.add(profile.getPeer());
-            if (_thresholdCapacityValue <= profile.getCapacityValue()) { 
+            // if not selectable for a tunnel (shitlisted for example),
+            // don't allow them in the high-cap pool, what would the point of that be?
+            if (_thresholdCapacityValue <= profile.getCapacityValue() &&
+                isSelectable(profile.getPeer())) {
                 _highCapacityPeers.put(profile.getPeer(), profile);
                 if (_log.shouldLog(Log.DEBUG))
                     _log.debug("High capacity: \t" + profile.getPeer().toBase64());
                 if (_thresholdSpeedValue <= profile.getSpeedValue()) {
-                    if (!isSelectable(profile.getPeer())) {
-                        if (_log.shouldLog(Log.INFO))
-                            _log.info("Skipping fast mark [!ok] for " + profile.getPeer().toBase64());
-                    } else if (!profile.getIsActive()) {
+                    if (!profile.getIsActive()) {
                         if (_log.shouldLog(Log.INFO))
                             _log.info("Skipping fast mark [!active] for " + profile.getPeer().toBase64());
                     } else {
-- 
GitLab