@@ -679,6 +679,14 @@ class PeerManagerImpl final : public PeerManager
679
679
std::chrono::microseconds NextInvToInbounds (std::chrono::microseconds now,
680
680
std::chrono::seconds average_interval);
681
681
682
+
683
+ // All of the following cache a recent block, and are protected by cs_most_recent_block
684
+ RecursiveMutex cs_most_recent_block;
685
+ std::shared_ptr<const CBlock> most_recent_block GUARDED_BY (cs_most_recent_block);
686
+ std::shared_ptr<const CBlockHeaderAndShortTxIDs> most_recent_compact_block GUARDED_BY (cs_most_recent_block);
687
+ uint256 most_recent_block_hash GUARDED_BY (cs_most_recent_block);
688
+ bool fWitnessesPresentInMostRecentCompactBlock GUARDED_BY (cs_most_recent_block){false };
689
+
682
690
/* * Have we requested this block from a peer */
683
691
bool IsBlockRequested (const uint256& hash) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
684
692
@@ -1613,13 +1621,6 @@ void PeerManagerImpl::BlockDisconnected(const std::shared_ptr<const CBlock> &blo
1613
1621
m_recent_confirmed_transactions.reset ();
1614
1622
}
1615
1623
1616
- // All of the following cache a recent block, and are protected by cs_most_recent_block
1617
- static RecursiveMutex cs_most_recent_block;
1618
- static std::shared_ptr<const CBlock> most_recent_block GUARDED_BY (cs_most_recent_block);
1619
- static std::shared_ptr<const CBlockHeaderAndShortTxIDs> most_recent_compact_block GUARDED_BY (cs_most_recent_block);
1620
- static uint256 most_recent_block_hash GUARDED_BY (cs_most_recent_block);
1621
- static bool fWitnessesPresentInMostRecentCompactBlock GUARDED_BY (cs_most_recent_block);
1622
-
1623
1624
/* *
1624
1625
* Maintain state about the best-seen block and fast-announce a compact block
1625
1626
* to compatible peers.
0 commit comments