Do not absolutely protect local peers from eviction.

With automatic tor HS support in place we should probably not be providing
 absolute protection for local peers, since HS inbound could be used to
 attack pretty easily.  Instead, this counts on the latency metric inside
 AttemptToEvictConnection to privilege actually local peers.
This commit is contained in:
Gregory Maxwell 2016-01-28 22:44:14 +00:00
parent cb83beb375
commit 46dbcd4833

View File

@ -884,8 +884,6 @@ static bool AttemptToEvictConnection(bool fPreferNewConnection) {
continue; continue;
if (node->fDisconnect) if (node->fDisconnect)
continue; continue;
if (node->addr.IsLocal())
continue;
vEvictionCandidates.push_back(CNodeRef(node)); vEvictionCandidates.push_back(CNodeRef(node));
} }
} }