aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGregory Maxwell <greg@xiph.org>2016-06-10 03:02:01 +0000
committerGregory Maxwell <greg@xiph.org>2016-06-15 20:19:13 +0000
commit6ee7f05622c32431a9815a96b31a6a65a821fdcc (patch)
tree062e452009692f2062d50ed0b57e2ea5b193f902 /src
parent5d0ca81f7422b7eac0a5129c6fbccad77e36b85d (diff)
downloadbitcoin-6ee7f05622c32431a9815a96b31a6a65a821fdcc.tar.xz
Allow disconnecting a netgroup with only one member in eviction.
With the latest additions there are enough protective measures that we can take the training wheels off.
Diffstat (limited to 'src')
-rw-r--r--src/net.cpp7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/net.cpp b/src/net.cpp
index ec547e8c99..89eb55ae94 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -965,13 +965,6 @@ static bool AttemptToEvictConnection() {
// Reduce to the network group with the most connections
vEvictionCandidates = std::move(mapAddrCounts[naMostConnections]);
- // Do not disconnect peers if there is only one unprotected connection from their network group.
- // This step excessively favors netgroup diversity, and should be removed once more protective criteria are established.
- if (vEvictionCandidates.size() <= 1)
- // unless we prefer the new connection (for whitelisted peers)
- if (!fPreferNewConnection)
- return false;
-
// Disconnect from the network group with the most connections
NodeId evicted = vEvictionCandidates.front().id;
LOCK(cs_vNodes);