Skip to content

Commit 6ee7f05

Browse files
committed
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.
1 parent 5d0ca81 commit 6ee7f05

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

src/net.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -965,13 +965,6 @@ static bool AttemptToEvictConnection() {
965965
// Reduce to the network group with the most connections
966966
vEvictionCandidates = std::move(mapAddrCounts[naMostConnections]);
967967

968-
// Do not disconnect peers if there is only one unprotected connection from their network group.
969-
// This step excessively favors netgroup diversity, and should be removed once more protective criteria are established.
970-
if (vEvictionCandidates.size() <= 1)
971-
// unless we prefer the new connection (for whitelisted peers)
972-
if (!fPreferNewConnection)
973-
return false;
974-
975968
// Disconnect from the network group with the most connections
976969
NodeId evicted = vEvictionCandidates.front().id;
977970
LOCK(cs_vNodes);

0 commit comments

Comments
 (0)