From 4847f6e96fc52ca636a6484edcc31457d22efe38 Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com> Date: Tue, 11 Jun 2024 20:46:07 +0000 Subject: [PATCH] refactor: move `m_initial_sync_finished` out of header The PeerManager implementation was moved into the source file in bitcoin#20811 (dash#5352) but the PR that introduced `m_initial_sync_finished` bitcoin#19858 (dash#5869) was merged later and didn't account for the out-of-order backport. We need to correct for that manually. --- src/net_processing.cpp | 4 ++++ src/net_processing.h | 5 ----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/net_processing.cpp b/src/net_processing.cpp index a8c4f52de1..c7cb7cb82a 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -524,6 +524,10 @@ private: /** Whether this node is running in blocks only mode */ const bool m_ignore_incoming_txs; + /** Whether we've completed initial sync yet, for determining when to turn + * on extra block-relay-only peers. */ + bool m_initial_sync_finished{false}; + /** Protects m_peer_map. This mutex must not be locked while holding a lock * on any of the mutexes inside a Peer object. */ mutable Mutex m_peer_mutex; diff --git a/src/net_processing.h b/src/net_processing.h index cc7c846b68..8c575a3e64 100644 --- a/src/net_processing.h +++ b/src/net_processing.h @@ -116,11 +116,6 @@ public: const std::chrono::microseconds time_received, const std::atomic& interruptMsgProc) = 0; virtual bool IsBanned(NodeId pnode) = 0; - - /** Whether we've completed initial sync yet, for determining when to turn - * on extra block-relay-only peers. */ - bool m_initial_sync_finished{false}; - }; #endif // BITCOIN_NET_PROCESSING_H