Skip to content

Commit 91c3392

Browse files
committed
[net processing] Move nHighestFastAnnounce into PeerManagerImpl
1 parent 10b83e2 commit 91c3392

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/net_processing.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,9 @@ class PeerManagerImpl final : public PeerManager
687687
uint256 most_recent_block_hash GUARDED_BY(cs_most_recent_block);
688688
bool fWitnessesPresentInMostRecentCompactBlock GUARDED_BY(cs_most_recent_block){false};
689689

690+
/** Height of the highest block announced using BIP 152 high-bandwidth mode. */
691+
int nHighestFastAnnounce{0};
692+
690693
/** Have we requested this block from a peer */
691694
bool IsBlockRequested(const uint256& hash) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
692695

@@ -1632,7 +1635,6 @@ void PeerManagerImpl::NewPoWValidBlock(const CBlockIndex *pindex, const std::sha
16321635

16331636
LOCK(cs_main);
16341637

1635-
static int nHighestFastAnnounce = 0;
16361638
if (pindex->nHeight <= nHighestFastAnnounce)
16371639
return;
16381640
nHighestFastAnnounce = pindex->nHeight;

0 commit comments

Comments
 (0)