forked from I2P_Developers/i2p.i2p
Fix blocklists with hashes only
This commit is contained in:
@@ -115,6 +115,16 @@ public class Blocklist {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for (Iterator iter = _peerBlocklist.keySet().iterator(); iter.hasNext(); ) {
|
||||||
|
Hash peer = (Hash) iter.next();
|
||||||
|
String reason = "Blocklisted by router hash";
|
||||||
|
String comment = (String) _peerBlocklist.get(peer);
|
||||||
|
if (comment != null)
|
||||||
|
reason = reason + ": " + comment;
|
||||||
|
_context.shitlist().shitlistRouterForever(peer, reason);
|
||||||
|
}
|
||||||
|
_peerBlocklist = null;
|
||||||
|
|
||||||
if (_blocklistSize <= 0)
|
if (_blocklistSize <= 0)
|
||||||
return;
|
return;
|
||||||
FloodfillNetworkDatabaseFacade fndf = (FloodfillNetworkDatabaseFacade) _context.netDb();
|
FloodfillNetworkDatabaseFacade fndf = (FloodfillNetworkDatabaseFacade) _context.netDb();
|
||||||
@@ -127,15 +137,6 @@ public class Blocklist {
|
|||||||
}
|
}
|
||||||
if (count > 0 && _log.shouldLog(Log.WARN))
|
if (count > 0 && _log.shouldLog(Log.WARN))
|
||||||
_log.warn("Blocklisted " + count + " routers in the netDb.");
|
_log.warn("Blocklisted " + count + " routers in the netDb.");
|
||||||
for (Iterator iter = _peerBlocklist.keySet().iterator(); iter.hasNext(); ) {
|
|
||||||
Hash peer = (Hash) iter.next();
|
|
||||||
String reason = "Blocklisted by router hash";
|
|
||||||
String comment = (String) _peerBlocklist.get(peer);
|
|
||||||
if (comment != null)
|
|
||||||
reason = reason + ": " + comment;
|
|
||||||
_context.shitlist().shitlistRouterForever(peer, reason);
|
|
||||||
}
|
|
||||||
_peerBlocklist = null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user