aboutsummaryrefslogtreecommitdiff
path: root/src/net_processing.cpp
diff options
context:
space:
mode:
authordergoegge <n.goeggi@gmail.com>2022-04-20 13:52:49 +0200
committerdergoegge <n.goeggi@gmail.com>2022-04-26 11:12:05 +0200
commit91c339243e11ec42eeeaca8fe015fc1c3e6338e1 (patch)
treeee81679e39dd3a67383aa20da323f92d85f99aa4 /src/net_processing.cpp
parent10b83e2aa3393ef2c942fde7ac86e8cf3ea224c1 (diff)
[net processing] Move nHighestFastAnnounce into PeerManagerImpl
Diffstat (limited to 'src/net_processing.cpp')
-rw-r--r--src/net_processing.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index 9b9b44cb48..f00cfb727d 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;