@@ -662,10 +662,10 @@ class PeerManagerImpl final : public PeerManager
662
662
bool CheckHeadersPoW (const std::vector<CBlockHeader>& headers, const Consensus::Params& consensusParams, Peer& peer);
663
663
/* * Calculate an anti-DoS work threshold for headers chains */
664
664
arith_uint256 GetAntiDoSWorkThreshold ();
665
- /* * Deal with state tracking and headers sync for peers that send the
666
- * occasional non-connecting header (this can happen due to BIP 130 headers
665
+ /* * Deal with state tracking and headers sync for peers that send
666
+ * non-connecting headers (this can happen due to BIP 130 headers
667
667
* announcements for blocks interacting with the 2hr (MAX_FUTURE_BLOCK_TIME) rule). */
668
- void HandleFewUnconnectingHeaders (CNode& pfrom, Peer& peer, const std::vector<CBlockHeader>& headers) EXCLUSIVE_LOCKS_REQUIRED(g_msgproc_mutex);
668
+ void HandleUnconnectingHeaders (CNode& pfrom, Peer& peer, const std::vector<CBlockHeader>& headers) EXCLUSIVE_LOCKS_REQUIRED(g_msgproc_mutex);
669
669
/* * Return true if the headers connect to each other, false otherwise */
670
670
bool CheckHeadersAreContinuous (const std::vector<CBlockHeader>& headers) const ;
671
671
/* * Try to continue a low-work headers sync that has already begun.
@@ -2715,7 +2715,7 @@ arith_uint256 PeerManagerImpl::GetAntiDoSWorkThreshold()
2715
2715
*
2716
2716
* We'll send a getheaders message in response to try to connect the chain.
2717
2717
*/
2718
- void PeerManagerImpl::HandleFewUnconnectingHeaders (CNode& pfrom, Peer& peer,
2718
+ void PeerManagerImpl::HandleUnconnectingHeaders (CNode& pfrom, Peer& peer,
2719
2719
const std::vector<CBlockHeader>& headers)
2720
2720
{
2721
2721
// Try to fill in the missing headers.
@@ -3094,12 +3094,10 @@ void PeerManagerImpl::ProcessHeadersMessage(CNode& pfrom, Peer& peer,
3094
3094
bool headers_connect_blockindex{chain_start_header != nullptr };
3095
3095
3096
3096
if (!headers_connect_blockindex) {
3097
- if (nCount <= MAX_BLOCKS_TO_ANNOUNCE) {
3098
- // If this looks like it could be a BIP 130 block announcement, use
3099
- // special logic for handling headers that don't connect, as this
3100
- // could be benign.
3101
- HandleFewUnconnectingHeaders (pfrom, peer, headers);
3102
- }
3097
+ // This could be a BIP 130 block announcement, use
3098
+ // special logic for handling headers that don't connect, as this
3099
+ // could be benign.
3100
+ HandleUnconnectingHeaders (pfrom, peer, headers);
3103
3101
return ;
3104
3102
}
3105
3103
0 commit comments