mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
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;
|
||||
|
||||
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 New Issue
Block a user