From 86e92c376a71c5cf5b061c0e7c178990c5d61c9f Mon Sep 17 00:00:00 2001 From: Konstantin Akimov Date: Sat, 23 Nov 2024 01:54:18 +0700 Subject: [PATCH] refactor: drop unused CConnman from CSigningManager --- src/llmq/context.cpp | 2 +- src/llmq/instantsend.h | 1 + src/llmq/signing.cpp | 4 ++-- src/llmq/signing.h | 4 +--- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/llmq/context.cpp b/src/llmq/context.cpp index 94da64087ca36..31857000d508e 100644 --- a/src/llmq/context.cpp +++ b/src/llmq/context.cpp @@ -33,7 +33,7 @@ LLMQContext::LLMQContext(ChainstateManager& chainman, CConnman& connman, CDeterm qman{std::make_unique(*bls_worker, chainman.ActiveChainstate(), connman, dmnman, *qdkgsman, evo_db, *quorum_block_processor, mn_activeman, mn_sync, sporkman, unit_tests, wipe)}, - sigman{std::make_unique(connman, mn_activeman, chainman.ActiveChainstate(), *qman, peerman, + sigman{std::make_unique(mn_activeman, chainman.ActiveChainstate(), *qman, peerman, unit_tests, wipe)}, shareman{std::make_unique(connman, *sigman, mn_activeman, *qman, sporkman, peerman)}, clhandler{[&]() -> llmq::CChainLocksHandler* const { diff --git a/src/llmq/instantsend.h b/src/llmq/instantsend.h index 5f8f9e18bd680..c0a27d74944b8 100644 --- a/src/llmq/instantsend.h +++ b/src/llmq/instantsend.h @@ -22,6 +22,7 @@ class CBlockIndex; class CChainState; +class CConnman; class CDBWrapper; class CMasternodeSync; class CSporkManager; diff --git a/src/llmq/signing.cpp b/src/llmq/signing.cpp index 4258eecc837e0..9aa5a72ec816f 100644 --- a/src/llmq/signing.cpp +++ b/src/llmq/signing.cpp @@ -348,9 +348,9 @@ void CRecoveredSigsDb::CleanupOldVotes(int64_t maxAge) ////////////////// -CSigningManager::CSigningManager(CConnman& _connman, const CActiveMasternodeManager* const mn_activeman, const CChainState& chainstate, +CSigningManager::CSigningManager(const CActiveMasternodeManager* const mn_activeman, const CChainState& chainstate, const CQuorumManager& _qman, const std::unique_ptr& peerman, bool fMemory, bool fWipe) : - db(fMemory, fWipe), connman(_connman), m_mn_activeman(mn_activeman), m_chainstate(chainstate), qman(_qman), m_peerman(peerman) + db(fMemory, fWipe), m_mn_activeman(mn_activeman), m_chainstate(chainstate), qman(_qman), m_peerman(peerman) { } diff --git a/src/llmq/signing.h b/src/llmq/signing.h index e3519cb3abf2f..e044c51bf6e7f 100644 --- a/src/llmq/signing.h +++ b/src/llmq/signing.h @@ -19,7 +19,6 @@ class CActiveMasternodeManager; class CChainState; -class CConnman; class CDataStream; class CDBBatch; class CDBWrapper; @@ -160,7 +159,6 @@ class CSigningManager private: CRecoveredSigsDb db; - CConnman& connman; const CActiveMasternodeManager* const m_mn_activeman; const CChainState& m_chainstate; const CQuorumManager& qman; @@ -179,7 +177,7 @@ class CSigningManager std::vector recoveredSigsListeners GUARDED_BY(cs_listeners); public: - CSigningManager(CConnman& _connman, const CActiveMasternodeManager* const mn_activeman, const CChainState& chainstate, + CSigningManager(const CActiveMasternodeManager* const mn_activeman, const CChainState& chainstate, const CQuorumManager& _qman, const std::unique_ptr& peerman, bool fMemory, bool fWipe); bool AlreadyHave(const CInv& inv) const;