aboutsummaryrefslogtreecommitdiff
path: root/src/net_processing.cpp
diff options
context:
space:
mode:
authorSuhas Daftuar <sdaftuar@gmail.com>2022-02-08 17:36:33 -0500
committerSuhas Daftuar <sdaftuar@gmail.com>2022-06-28 15:53:25 -0400
commit2b341db731793844f12944363186edea23eabdeb (patch)
tree7287f3a9e4b508f33f1f1e2ec42585015a906402 /src/net_processing.cpp
parent29c45185223441943ab610e62937a118c7c3a5b2 (diff)
downloadbitcoin-2b341db731793844f12944363186edea23eabdeb.tar.xz
Move headers direct fetch to end of ProcessHeadersMessage
Diffstat (limited to 'src/net_processing.cpp')
-rw-r--r--src/net_processing.cpp6
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;
}