diff options
author | Suhas Daftuar <sdaftuar@gmail.com> | 2022-02-08 17:36:33 -0500 |
---|---|---|
committer | Suhas Daftuar <sdaftuar@gmail.com> | 2022-06-28 15:53:25 -0400 |
commit | 2b341db731793844f12944363186edea23eabdeb (patch) | |
tree | 7287f3a9e4b508f33f1f1e2ec42585015a906402 /src/net_processing.cpp | |
parent | 29c45185223441943ab610e62937a118c7c3a5b2 (diff) |
Move headers direct fetch to end of ProcessHeadersMessage
Diffstat (limited to 'src/net_processing.cpp')
-rw-r--r-- | src/net_processing.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 189556e03e..2be5d5f50d 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -2424,9 +2424,6 @@ void PeerManagerImpl::ProcessHeadersMessage(CNode& pfrom, Peer& peer, nodestate->m_last_block_announcement = GetTime(); } - // Consider immediately downloading blocks. - HeadersDirectFetchBlocks(pfrom, pindexLast); - // If we're in IBD, we want outbound peers that will serve us a useful // chain. Disconnect peers that are on chains with insufficient work. if (m_chainman.ActiveChainstate().IsInitialBlockDownload() && nCount != MAX_HEADERS_RESULTS) { @@ -2462,6 +2459,9 @@ void PeerManagerImpl::ProcessHeadersMessage(CNode& pfrom, Peer& peer, } } + // Consider immediately downloading blocks. + HeadersDirectFetchBlocks(pfrom, pindexLast); + return; } |