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.
This commit is contained in:
parent
4ee149a6db
commit
40b77d450d
1 changed files with 3 additions and 3 deletions
|
@ -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())
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue