From eb3596f7c220685fe6203178d5535c6775a789df Mon Sep 17 00:00:00 2001 From: Gregory Maxwell Date: Thu, 25 Aug 2016 23:42:40 +0000 Subject: Do not add random inbound peers to addrman. We should learn about new peers via address messages. An inbound peer connecting to us tells us nothing about its ability to accept incoming connections from us, so we shouldn't assume that we can connect to it based on this. The vast majority of nodes on the network do not accept incoming connections, adding them will only slow down the process of making a successful connection in the future. Nodes which have configured themselves to not announce would prefer we not violate their privacy by announcing them in GETADDR responses. --- src/main.cpp | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src') diff --git a/src/main.cpp b/src/main.cpp index 5160e60750..ddd0541101 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -5029,12 +5029,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, pfrom->fGetAddr = true; } addrman.Good(pfrom->addr); - } else { - if (((CNetAddr)pfrom->addr) == (CNetAddr)addrFrom) - { - addrman.Add(addrFrom, addrFrom); - addrman.Good(addrFrom); - } } pfrom->fSuccessfullyConnected = true; -- cgit v1.2.3