Skip to content

Commit e499f21

Browse files
committed
refactor: remove unused mn_sync from llmq context
1 parent ac1591a commit e499f21

File tree

5 files changed

+7
-11
lines changed

5 files changed

+7
-11
lines changed

src/instantsend/instantsend.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,10 @@ using node::fReindex;
1717

1818
namespace llmq {
1919
CInstantSendManager::CInstantSendManager(const chainlock::Chainlocks& chainlocks, CSporkManager& sporkman,
20-
const CMasternodeSync& mn_sync, const util::DbWrapperParams& db_params) :
20+
const util::DbWrapperParams& db_params) :
2121
db{db_params},
2222
m_chainlocks{chainlocks},
23-
spork_manager{sporkman},
24-
m_mn_sync{mn_sync}
23+
spork_manager{sporkman}
2524
{
2625
}
2726

src/instantsend/instantsend.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
class CBlockIndex;
2424
class CDataStream;
25-
class CMasternodeSync;
2625
class CSporkManager;
2726
namespace Consensus {
2827
struct LLMQParams;
@@ -61,7 +60,6 @@ class CInstantSendManager
6160

6261
const chainlock::Chainlocks& m_chainlocks;
6362
CSporkManager& spork_manager;
64-
const CMasternodeSync& m_mn_sync;
6563

6664
mutable Mutex cs_pendingLocks;
6765
// Incoming and not verified yet
@@ -98,7 +96,7 @@ class CInstantSendManager
9896
CInstantSendManager(const CInstantSendManager&) = delete;
9997
CInstantSendManager& operator=(const CInstantSendManager&) = delete;
10098
explicit CInstantSendManager(const chainlock::Chainlocks& chainlocks, CSporkManager& sporkman,
101-
const CMasternodeSync& mn_sync, const util::DbWrapperParams& db_params);
99+
const util::DbWrapperParams& db_params);
102100
~CInstantSendManager();
103101

104102
void AddNonLockedTx(const CTransactionRef& tx, const CBlockIndex* pindexMined)

src/llmq/context.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include <validation.h>
1414

1515
LLMQContext::LLMQContext(CDeterministicMNManager& dmnman, CEvoDB& evo_db, CSporkManager& sporkman,
16-
chainlock::Chainlocks& chainlocks, ChainstateManager& chainman, const CMasternodeSync& mn_sync,
16+
chainlock::Chainlocks& chainlocks, ChainstateManager& chainman,
1717
const util::DbWrapperParams& db_params, int8_t bls_threads, int64_t max_recsigs_age) :
1818
bls_worker{std::make_shared<CBLSWorker>()},
1919
qsnapman{std::make_unique<llmq::CQuorumSnapshotManager>(evo_db)},
@@ -22,7 +22,7 @@ LLMQContext::LLMQContext(CDeterministicMNManager& dmnman, CEvoDB& evo_db, CSpork
2222
qman{std::make_unique<llmq::CQuorumManager>(*bls_worker, dmnman, evo_db, *quorum_block_processor, *qsnapman,
2323
chainman, db_params)},
2424
sigman{std::make_unique<llmq::CSigningManager>(*qman, db_params, max_recsigs_age)},
25-
isman{std::make_unique<llmq::CInstantSendManager>(chainlocks, sporkman, mn_sync, db_params)}
25+
isman{std::make_unique<llmq::CInstantSendManager>(chainlocks, sporkman, db_params)}
2626
{
2727
// Have to start it early to let VerifyDB check ChainLock signatures in coinbase
2828
bls_worker->Start();

src/llmq/context.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ class CBLSWorker;
1313
class ChainstateManager;
1414
class CDeterministicMNManager;
1515
class CEvoDB;
16-
class CMasternodeSync;
1716
class CSporkManager;
1817
class PeerManager;
1918

@@ -38,7 +37,7 @@ struct LLMQContext {
3837
LLMQContext(const LLMQContext&) = delete;
3938
LLMQContext& operator=(const LLMQContext&) = delete;
4039
explicit LLMQContext(CDeterministicMNManager& dmnman, CEvoDB& evo_db, CSporkManager& sporkman,
41-
chainlock::Chainlocks& chainlocks, ChainstateManager& chainman, const CMasternodeSync& mn_sync,
40+
chainlock::Chainlocks& chainlocks, ChainstateManager& chainman,
4241
const util::DbWrapperParams& db_params, int8_t bls_threads, int64_t max_recsigs_age);
4342
~LLMQContext();
4443

src/node/chainstate.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ void DashChainstateSetup(ChainstateManager& chainman,
227227
dmnman = std::make_unique<CDeterministicMNManager>(evodb, mn_metaman);
228228

229229
llmq_ctx.reset();
230-
llmq_ctx = std::make_unique<LLMQContext>(*dmnman, evodb, sporkman, chainlocks, chainman, mn_sync,
230+
llmq_ctx = std::make_unique<LLMQContext>(*dmnman, evodb, sporkman, chainlocks, chainman,
231231
util::DbWrapperParams{.path = data_dir, .memory = llmq_dbs_in_memory, .wipe = llmq_dbs_wipe},
232232
bls_threads, max_recsigs_age);
233233
mempool->ConnectManagers(dmnman.get(), llmq_ctx->isman.get());

0 commit comments

Comments
 (0)