Skip to content

Commit 2b341db

Browse files
committed
Move headers direct fetch to end of ProcessHeadersMessage
1 parent 29c4518 commit 2b341db

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/net_processing.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2424,9 +2424,6 @@ void PeerManagerImpl::ProcessHeadersMessage(CNode& pfrom, Peer& peer,
24242424
nodestate->m_last_block_announcement = GetTime();
24252425
}
24262426

2427-
// Consider immediately downloading blocks.
2428-
HeadersDirectFetchBlocks(pfrom, pindexLast);
2429-
24302427
// If we're in IBD, we want outbound peers that will serve us a useful
24312428
// chain. Disconnect peers that are on chains with insufficient work.
24322429
if (m_chainman.ActiveChainstate().IsInitialBlockDownload() && nCount != MAX_HEADERS_RESULTS) {
@@ -2462,6 +2459,9 @@ void PeerManagerImpl::ProcessHeadersMessage(CNode& pfrom, Peer& peer,
24622459
}
24632460
}
24642461

2462+
// Consider immediately downloading blocks.
2463+
HeadersDirectFetchBlocks(pfrom, pindexLast);
2464+
24652465
return;
24662466
}
24672467

0 commit comments

Comments
 (0)