refactor: remove unused CConnman from CDeterministicMNManager ctor

This commit is contained in:
Kittywhiskers Van Gogh 2024-12-05 22:18:08 +00:00
parent a14e604064
commit ac930a84d8
No known key found for this signature in database
GPG Key ID: 30CD0C065E5C4AAD
3 changed files with 7 additions and 6 deletions

View File

@ -30,7 +30,6 @@ class CBlock;
class CBlockIndex;
class CChainState;
class CCoinsViewCache;
class CConnman;
class CEvoDB;
class TxValidationState;
@ -583,7 +582,6 @@ private:
std::atomic<int> to_cleanup {0};
CChainState& m_chainstate;
CConnman& connman;
CEvoDB& m_evoDb;
std::unordered_map<uint256, CDeterministicMNList, StaticSaltedHasher> mnListsCache GUARDED_BY(cs);
@ -592,8 +590,11 @@ private:
const CBlockIndex* m_initial_snapshot_index GUARDED_BY(cs) {nullptr};
public:
explicit CDeterministicMNManager(CChainState& chainstate, CConnman& _connman, CEvoDB& evoDb) :
m_chainstate(chainstate), connman(_connman), m_evoDb(evoDb) {}
explicit CDeterministicMNManager(CChainState& chainstate, CEvoDB& evoDb) :
m_chainstate(chainstate),
m_evoDb(evoDb)
{
}
~CDeterministicMNManager() = default;
bool ProcessBlock(const CBlock& block, gsl::not_null<const CBlockIndex*> pindex, BlockValidationState& state,

View File

@ -1888,7 +1888,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
// Same logic as above with pblocktree
node.dmnman.reset();
node.dmnman = std::make_unique<CDeterministicMNManager>(chainman.ActiveChainstate(), *node.connman, *node.evodb);
node.dmnman = std::make_unique<CDeterministicMNManager>(chainman.ActiveChainstate(), *node.evodb);
node.mempool->ConnectManagers(node.dmnman.get());
node.cpoolman.reset();

View File

@ -107,7 +107,7 @@ void DashTestSetup(NodeContext& node, const CChainParams& chainparams)
{
CChainState& chainstate = Assert(node.chainman)->ActiveChainstate();
node.dmnman = std::make_unique<CDeterministicMNManager>(chainstate, *node.connman, *node.evodb);
node.dmnman = std::make_unique<CDeterministicMNManager>(chainstate, *node.evodb);
node.mempool->ConnectManagers(node.dmnman.get());
node.cj_ctx = std::make_unique<CJContext>(*node.chainman, *node.connman, *node.dmnman, *node.mn_metaman, *node.mempool,