Skip to content

Commit ac930a8

Browse files
committed
refactor: remove unused CConnman from CDeterministicMNManager ctor
1 parent a14e604 commit ac930a8

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

src/evo/deterministicmns.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ class CBlock;
3030
class CBlockIndex;
3131
class CChainState;
3232
class CCoinsViewCache;
33-
class CConnman;
3433
class CEvoDB;
3534
class TxValidationState;
3635

@@ -583,7 +582,6 @@ class CDeterministicMNManager
583582
std::atomic<int> to_cleanup {0};
584583

585584
CChainState& m_chainstate;
586-
CConnman& connman;
587585
CEvoDB& m_evoDb;
588586

589587
std::unordered_map<uint256, CDeterministicMNList, StaticSaltedHasher> mnListsCache GUARDED_BY(cs);
@@ -592,8 +590,11 @@ class CDeterministicMNManager
592590
const CBlockIndex* m_initial_snapshot_index GUARDED_BY(cs) {nullptr};
593591

594592
public:
595-
explicit CDeterministicMNManager(CChainState& chainstate, CConnman& _connman, CEvoDB& evoDb) :
596-
m_chainstate(chainstate), connman(_connman), m_evoDb(evoDb) {}
593+
explicit CDeterministicMNManager(CChainState& chainstate, CEvoDB& evoDb) :
594+
m_chainstate(chainstate),
595+
m_evoDb(evoDb)
596+
{
597+
}
597598
~CDeterministicMNManager() = default;
598599

599600
bool ProcessBlock(const CBlock& block, gsl::not_null<const CBlockIndex*> pindex, BlockValidationState& state,

src/init.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1888,7 +1888,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
18881888

18891889
// Same logic as above with pblocktree
18901890
node.dmnman.reset();
1891-
node.dmnman = std::make_unique<CDeterministicMNManager>(chainman.ActiveChainstate(), *node.connman, *node.evodb);
1891+
node.dmnman = std::make_unique<CDeterministicMNManager>(chainman.ActiveChainstate(), *node.evodb);
18921892
node.mempool->ConnectManagers(node.dmnman.get());
18931893

18941894
node.cpoolman.reset();

src/test/util/setup_common.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ void DashTestSetup(NodeContext& node, const CChainParams& chainparams)
107107
{
108108
CChainState& chainstate = Assert(node.chainman)->ActiveChainstate();
109109

110-
node.dmnman = std::make_unique<CDeterministicMNManager>(chainstate, *node.connman, *node.evodb);
110+
node.dmnman = std::make_unique<CDeterministicMNManager>(chainstate, *node.evodb);
111111
node.mempool->ConnectManagers(node.dmnman.get());
112112

113113
node.cj_ctx = std::make_unique<CJContext>(*node.chainman, *node.connman, *node.dmnman, *node.mn_metaman, *node.mempool,

0 commit comments

Comments
 (0)