diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-11-09 14:27:08 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-11-09 14:28:49 +0100 |
commit | 40b77d450dff6879c50a33d4e7f795c385fb0002 (patch) | |
tree | ae7a9e869f271f26edd1b9c2e54d4055e93cf684 /src | |
parent | 4ee149a6db25cde31432f83369b40c92be13021c (diff) | |
download | bitcoin-40b77d450dff6879c50a33d4e7f795c385fb0002.tar.xz |
Always allow getheaders from whitelisted peers
Process `getheaders` messages from whitelisted peers even if we are in
initial block download. Whitelisted peers can always use a node as a
block source.
Also log a debug message when the request is ignored, for
troubleshooting.
Fixes #6971.
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp index 9016fe42a0..c5c5e40ee8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4303,10 +4303,10 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, vRecv >> locator >> hashStop; LOCK(cs_main); - - if (IsInitialBlockDownload()) + if (IsInitialBlockDownload() && !pfrom->fWhitelisted) { + LogPrint("net", "Ignoring getheaders from peer=%d because node is in initial block download\n", pfrom->id); return true; - + } CBlockIndex* pindex = NULL; if (locator.IsNull()) { |