mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
refactor: remove unused CConnman
from CDeterministicMNManager
ctor
This commit is contained in:
parent
a14e604064
commit
ac930a84d8
@ -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,
|
||||
|
@ -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();
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user