aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGregory Maxwell <greg@xiph.org>2016-08-25 23:42:40 +0000
committerPieter Wuille <pieter.wuille@gmail.com>2016-09-07 16:43:15 +0200
commitab295bb4be26939e4853b9d95a9938c5ed8afa57 (patch)
tree861f93ead65ebe327b08cade32222496a7d1664a /src
parentbbf379b0552c357088e349dd6608730489696b80 (diff)
downloadbitcoin-ab295bb4be26939e4853b9d95a9938c5ed8afa57.tar.xz
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.
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 0b8588efa7..40f2fffe73 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -5057,12 +5057,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;