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
|
@ -4303,10 +4303,10 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
|
||||||
vRecv >> locator >> hashStop;
|
vRecv >> locator >> hashStop;
|
||||||
|
|
||||||
LOCK(cs_main);
|
LOCK(cs_main);
|
||||||
|
if (IsInitialBlockDownload() && !pfrom->fWhitelisted) {
|
||||||
if (IsInitialBlockDownload())
|
LogPrint("net", "Ignoring getheaders from peer=%d because node is in initial block download\n", pfrom->id);
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
CBlockIndex* pindex = NULL;
|
CBlockIndex* pindex = NULL;
|
||||||
if (locator.IsNull())
|
if (locator.IsNull())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue