This commit is contained in:
jl777
2018-11-23 05:26:25 -11:00
parent 77203852d4
commit 3abe9b46d9

View File

@@ -6843,15 +6843,20 @@ fprintf(stderr,"netmsg: %s\n", strCommand.c_str());
LOCK(cs_main); LOCK(cs_main);
if (IsInitialBlockDownload()) if (IsInitialBlockDownload())
{
fprintf(stderr,"dont process getheaders during initial download\n");
return true; return true;
}
CBlockIndex* pindex = NULL; CBlockIndex* pindex = NULL;
if (locator.IsNull()) if (locator.IsNull())
{ {
// If locator is null, return the hashStop block // If locator is null, return the hashStop block
BlockMap::iterator mi = mapBlockIndex.find(hashStop); BlockMap::iterator mi = mapBlockIndex.find(hashStop);
if (mi == mapBlockIndex.end()) if (mi == mapBlockIndex.end())
{
fprintf(stderr,"mi == end()\n");
return true; return true;
}
pindex = (*mi).second; pindex = (*mi).second;
} }
else else
@@ -6878,6 +6883,7 @@ fprintf(stderr,"netmsg: %s\n", strCommand.c_str());
if (--nLimit <= 0 || pindex->GetBlockHash() == hashStop) if (--nLimit <= 0 || pindex->GetBlockHash() == hashStop)
break; break;
} }
fprintf(stderr,"send headers\n");
pfrom->PushMessage("headers", vHeaders); pfrom->PushMessage("headers", vHeaders);
} }
/*else if ( IS_KOMODO_NOTARY != 0 ) /*else if ( IS_KOMODO_NOTARY != 0 )