If AcceptBlockHeader returns true, pindex will be set.
This commit is contained in:
@@ -5533,7 +5533,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
|
||||
assert(pindexLast);
|
||||
UpdateBlockAvailability(pfrom->GetId(), pindexLast->GetBlockHash());
|
||||
|
||||
if (nCount == MAX_HEADERS_RESULTS && pindexLast && hasNewHeaders) {
|
||||
if (nCount == MAX_HEADERS_RESULTS && hasNewHeaders) {
|
||||
// Headers message had its maximum size; the peer may have more headers.
|
||||
// TODO: optimize: if pindexLast is an ancestor of chainActive.Tip or pindexBestHeader, continue
|
||||
// from there instead.
|
||||
|
||||
Reference in New Issue
Block a user