diff --git a/src/net_processing.h b/src/net_processing.h --- a/src/net_processing.h +++ b/src/net_processing.h @@ -35,18 +35,6 @@ class PeerLogicValidation final : public CValidationInterface, public NetEventsInterface { -private: - CConnman &m_connman; - /** - * Pointer to this node's banman. May be nullptr - check existence before - * dereferencing. - */ - BanMan *const m_banman; - ChainstateManager &m_chainman; - CTxMemPool &m_mempool; - - bool MaybeDiscourageAndDisconnect(CNode &pnode); - public: PeerLogicValidation(CConnman &connman, BanMan *banman, CScheduler &scheduler, ChainstateManager &chainman, @@ -129,6 +117,25 @@ const std::atomic &interruptMsgProc); private: + /** + * Maybe disconnect a peer and discourage future connections from its + * address. + * + * @param[in] pnode The node to check. + * @return True if the peer was marked for disconnection in + * this function + */ + bool MaybeDiscourageAndDisconnect(CNode &pnode); + + CConnman &m_connman; + /** + * Pointer to this node's banman. May be nullptr - check existence before + * dereferencing. + */ + BanMan *const m_banman; + ChainstateManager &m_chainman; + CTxMemPool &m_mempool; + //! Next time to check for stale tip int64_t m_stale_tip_check_time; }; diff --git a/src/net_processing.cpp b/src/net_processing.cpp --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -4315,13 +4315,6 @@ return; } -/** - * Maybe disconnect a peer and discourage future connections from its address. - * - * @param[in] pnode The node to check. - * @return True if the peer was marked for disconnection in this - * function - */ bool PeerLogicValidation::MaybeDiscourageAndDisconnect(CNode &pnode) { const NodeId peer_id{pnode.GetId()}; PeerRef peer = GetPeerRef(peer_id);