From 91c339243e11ec42eeeaca8fe015fc1c3e6338e1 Mon Sep 17 00:00:00 2001 From: dergoegge Date: Wed, 20 Apr 2022 13:52:49 +0200 Subject: [PATCH] [net processing] Move nHighestFastAnnounce into PeerManagerImpl --- src/net_processing.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 9b9b44cb481..f00cfb727dc 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -687,6 +687,9 @@ private: uint256 most_recent_block_hash GUARDED_BY(cs_most_recent_block); bool fWitnessesPresentInMostRecentCompactBlock GUARDED_BY(cs_most_recent_block){false}; + /** Height of the highest block announced using BIP 152 high-bandwidth mode. */ + int nHighestFastAnnounce{0}; + /** Have we requested this block from a peer */ bool IsBlockRequested(const uint256& hash) EXCLUSIVE_LOCKS_REQUIRED(cs_main); @@ -1632,7 +1635,6 @@ void PeerManagerImpl::NewPoWValidBlock(const CBlockIndex *pindex, const std::sha LOCK(cs_main); - static int nHighestFastAnnounce = 0; if (pindex->nHeight <= nHighestFastAnnounce) return; nHighestFastAnnounce = pindex->nHeight;