File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -610,6 +610,11 @@ class PeerManagerImpl final : public PeerManager
610
610
/* * Number of outbound peers with m_chain_sync.m_protect. */
611
611
int m_outbound_peers_with_protect_from_disconnect GUARDED_BY (cs_main) = 0;
612
612
613
+ /* * Number of preferable block download peers. */
614
+ int nPreferredDownload GUARDED_BY (cs_main){0 };
615
+
616
+ void UpdatePreferredDownload (const CNode& node, CNodeState* state) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
617
+
613
618
bool AlreadyHaveTx (const GenTxid& gtxid) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
614
619
615
620
/* *
@@ -817,14 +822,6 @@ class PeerManagerImpl final : public PeerManager
817
822
*/
818
823
bool SetupAddressRelay (const CNode& node, Peer& peer);
819
824
};
820
- } // namespace
821
-
822
- namespace {
823
- /* * Number of preferable block download peers. */
824
- int nPreferredDownload GUARDED_BY (cs_main) = 0;
825
- } // namespace
826
-
827
- namespace {
828
825
829
826
const CNodeState* PeerManagerImpl::State (NodeId pnode) const EXCLUSIVE_LOCKS_REQUIRED(cs_main)
830
827
{
@@ -878,7 +875,7 @@ static void AddKnownTx(Peer& peer, const uint256& hash)
878
875
}
879
876
}
880
877
881
- static void UpdatePreferredDownload (const CNode& node, CNodeState* state) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
878
+ void PeerManagerImpl:: UpdatePreferredDownload (const CNode& node, CNodeState* state) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
882
879
{
883
880
nPreferredDownload -= state->fPreferredDownload ;
884
881
You can’t perform that action at this time.
0 commit comments