mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 11:32:46 +01:00
refactor: s/sporkManager/sporkman/g
sporkManager was the name of the global that's been removed a commit ago, remove variable names that could be misread as the global still existing
This commit is contained in:
parent
60fd1aa774
commit
405b8c669a
@ -7,6 +7,6 @@ source test_used_size.gdb
|
|||||||
#logsize mnodeman "memlog.txt"
|
#logsize mnodeman "memlog.txt"
|
||||||
logsize mnpayments "memlog.txt"
|
logsize mnpayments "memlog.txt"
|
||||||
#logsize instantsend "memlog.txt"
|
#logsize instantsend "memlog.txt"
|
||||||
#logsize sporkManager "memlog.txt"
|
#logsize sporkman "memlog.txt"
|
||||||
#logsize masternodeSync "memlog.txt"
|
#logsize masternodeSync "memlog.txt"
|
||||||
#logsize governance "memlog.txt"
|
#logsize governance "memlog.txt"
|
||||||
|
@ -1563,7 +1563,7 @@ void CGovernanceManager::RemoveInvalidVotes()
|
|||||||
lastMNListForVotingKeys = std::make_shared<CDeterministicMNList>(curMNList);
|
lastMNListForVotingKeys = std::make_shared<CDeterministicMNList>(curMNList);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AreSuperblocksEnabled(const CSporkManager& sporkManager)
|
bool AreSuperblocksEnabled(const CSporkManager& sporkman)
|
||||||
{
|
{
|
||||||
return sporkManager.IsSporkActive(SPORK_9_SUPERBLOCKS_ENABLED);
|
return sporkman.IsSporkActive(SPORK_9_SUPERBLOCKS_ENABLED);
|
||||||
}
|
}
|
||||||
|
@ -403,6 +403,6 @@ private:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
bool AreSuperblocksEnabled(const CSporkManager& sporkManager);
|
bool AreSuperblocksEnabled(const CSporkManager& sporkman);
|
||||||
|
|
||||||
#endif // BITCOIN_GOVERNANCE_GOVERNANCE_H
|
#endif // BITCOIN_GOVERNANCE_GOVERNANCE_H
|
||||||
|
@ -26,7 +26,7 @@ namespace llmq
|
|||||||
std::unique_ptr<CChainLocksHandler> chainLocksHandler;
|
std::unique_ptr<CChainLocksHandler> chainLocksHandler;
|
||||||
|
|
||||||
CChainLocksHandler::CChainLocksHandler(CChainState& chainstate, CConnman& _connman, CMasternodeSync& mn_sync, CQuorumManager& _qman,
|
CChainLocksHandler::CChainLocksHandler(CChainState& chainstate, CConnman& _connman, CMasternodeSync& mn_sync, CQuorumManager& _qman,
|
||||||
CSigningManager& _sigman, CSigSharesManager& _shareman, CSporkManager& sporkManager,
|
CSigningManager& _sigman, CSigSharesManager& _shareman, CSporkManager& sporkman,
|
||||||
CTxMemPool& _mempool) :
|
CTxMemPool& _mempool) :
|
||||||
m_chainstate(chainstate),
|
m_chainstate(chainstate),
|
||||||
connman(_connman),
|
connman(_connman),
|
||||||
@ -34,7 +34,7 @@ CChainLocksHandler::CChainLocksHandler(CChainState& chainstate, CConnman& _connm
|
|||||||
qman(_qman),
|
qman(_qman),
|
||||||
sigman(_sigman),
|
sigman(_sigman),
|
||||||
shareman(_shareman),
|
shareman(_shareman),
|
||||||
spork_manager(sporkManager),
|
spork_manager(sporkman),
|
||||||
mempool(_mempool),
|
mempool(_mempool),
|
||||||
scheduler(std::make_unique<CScheduler>()),
|
scheduler(std::make_unique<CScheduler>()),
|
||||||
scheduler_thread(std::make_unique<std::thread>(std::thread(util::TraceThread, "cl-schdlr", [&] { scheduler->serviceQueue(); })))
|
scheduler_thread(std::make_unique<std::thread>(std::thread(util::TraceThread, "cl-schdlr", [&] { scheduler->serviceQueue(); })))
|
||||||
@ -668,14 +668,14 @@ void CChainLocksHandler::Cleanup()
|
|||||||
lastCleanupTime = GetTimeMillis();
|
lastCleanupTime = GetTimeMillis();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AreChainLocksEnabled(const CSporkManager& sporkManager)
|
bool AreChainLocksEnabled(const CSporkManager& sporkman)
|
||||||
{
|
{
|
||||||
return sporkManager.IsSporkActive(SPORK_19_CHAINLOCKS_ENABLED);
|
return sporkman.IsSporkActive(SPORK_19_CHAINLOCKS_ENABLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ChainLocksSigningEnabled(const CSporkManager& sporkManager)
|
bool ChainLocksSigningEnabled(const CSporkManager& sporkman)
|
||||||
{
|
{
|
||||||
return sporkManager.GetSporkValue(SPORK_19_CHAINLOCKS_ENABLED) == 0;
|
return sporkman.GetSporkValue(SPORK_19_CHAINLOCKS_ENABLED) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace llmq
|
} // namespace llmq
|
||||||
|
@ -86,7 +86,7 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit CChainLocksHandler(CChainState& chainstate, CConnman& _connman, CMasternodeSync& mn_sync, CQuorumManager& _qman,
|
explicit CChainLocksHandler(CChainState& chainstate, CConnman& _connman, CMasternodeSync& mn_sync, CQuorumManager& _qman,
|
||||||
CSigningManager& _sigman, CSigSharesManager& _shareman, CSporkManager& sporkManager,
|
CSigningManager& _sigman, CSigSharesManager& _shareman, CSporkManager& sporkman,
|
||||||
CTxMemPool& _mempool);
|
CTxMemPool& _mempool);
|
||||||
~CChainLocksHandler();
|
~CChainLocksHandler();
|
||||||
|
|
||||||
@ -128,8 +128,8 @@ private:
|
|||||||
|
|
||||||
extern std::unique_ptr<CChainLocksHandler> chainLocksHandler;
|
extern std::unique_ptr<CChainLocksHandler> chainLocksHandler;
|
||||||
|
|
||||||
bool AreChainLocksEnabled(const CSporkManager& sporkManager);
|
bool AreChainLocksEnabled(const CSporkManager& sporkman);
|
||||||
bool ChainLocksSigningEnabled(const CSporkManager& sporkManager);
|
bool ChainLocksSigningEnabled(const CSporkManager& sporkman);
|
||||||
|
|
||||||
} // namespace llmq
|
} // namespace llmq
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ static const std::string DB_SKCONTRIB = "qdkg_S";
|
|||||||
static const std::string DB_ENC_CONTRIB = "qdkg_E";
|
static const std::string DB_ENC_CONTRIB = "qdkg_E";
|
||||||
|
|
||||||
CDKGSessionManager::CDKGSessionManager(CBLSWorker& _blsWorker, CChainState& chainstate, CConnman& _connman, CDKGDebugManager& _dkgDebugManager,
|
CDKGSessionManager::CDKGSessionManager(CBLSWorker& _blsWorker, CChainState& chainstate, CConnman& _connman, CDKGDebugManager& _dkgDebugManager,
|
||||||
CQuorumBlockProcessor& _quorumBlockProcessor, const CSporkManager& sporkManager,
|
CQuorumBlockProcessor& _quorumBlockProcessor, const CSporkManager& sporkman,
|
||||||
bool unitTests, bool fWipe) :
|
bool unitTests, bool fWipe) :
|
||||||
db(std::make_unique<CDBWrapper>(unitTests ? "" : (GetDataDir() / "llmq/dkgdb"), 1 << 20, unitTests, fWipe)),
|
db(std::make_unique<CDBWrapper>(unitTests ? "" : (GetDataDir() / "llmq/dkgdb"), 1 << 20, unitTests, fWipe)),
|
||||||
blsWorker(_blsWorker),
|
blsWorker(_blsWorker),
|
||||||
@ -33,7 +33,7 @@ CDKGSessionManager::CDKGSessionManager(CBLSWorker& _blsWorker, CChainState& chai
|
|||||||
connman(_connman),
|
connman(_connman),
|
||||||
dkgDebugManager(_dkgDebugManager),
|
dkgDebugManager(_dkgDebugManager),
|
||||||
quorumBlockProcessor(_quorumBlockProcessor),
|
quorumBlockProcessor(_quorumBlockProcessor),
|
||||||
spork_manager(sporkManager)
|
spork_manager(sporkman)
|
||||||
{
|
{
|
||||||
if (!fMasternodeMode && !IsWatchQuorumsEnabled()) {
|
if (!fMasternodeMode && !IsWatchQuorumsEnabled()) {
|
||||||
// Regular nodes do not care about any DKG internals, bail out
|
// Regular nodes do not care about any DKG internals, bail out
|
||||||
@ -520,9 +520,9 @@ void CDKGSessionManager::CleanupOldContributions() const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsQuorumDKGEnabled(const CSporkManager& sporkManager)
|
bool IsQuorumDKGEnabled(const CSporkManager& sporkman)
|
||||||
{
|
{
|
||||||
return sporkManager.IsSporkActive(SPORK_17_QUORUM_DKG_ENABLED);
|
return sporkman.IsSporkActive(SPORK_17_QUORUM_DKG_ENABLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace llmq
|
} // namespace llmq
|
||||||
|
@ -64,7 +64,7 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
CDKGSessionManager(CBLSWorker& _blsWorker, CChainState& chainstate, CConnman& _connman, CDKGDebugManager& _dkgDebugManager,
|
CDKGSessionManager(CBLSWorker& _blsWorker, CChainState& chainstate, CConnman& _connman, CDKGDebugManager& _dkgDebugManager,
|
||||||
CQuorumBlockProcessor& _quorumBlockProcessor, const CSporkManager& sporkManager,
|
CQuorumBlockProcessor& _quorumBlockProcessor, const CSporkManager& sporkman,
|
||||||
bool unitTests, bool fWipe);
|
bool unitTests, bool fWipe);
|
||||||
~CDKGSessionManager() = default;
|
~CDKGSessionManager() = default;
|
||||||
|
|
||||||
@ -96,7 +96,7 @@ private:
|
|||||||
void CleanupCache() const;
|
void CleanupCache() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool IsQuorumDKGEnabled(const CSporkManager& sporkManager);
|
bool IsQuorumDKGEnabled(const CSporkManager& sporkman);
|
||||||
} // namespace llmq
|
} // namespace llmq
|
||||||
|
|
||||||
#endif // BITCOIN_LLMQ_DKGSESSIONMGR_H
|
#endif // BITCOIN_LLMQ_DKGSESSIONMGR_H
|
||||||
|
@ -256,11 +256,11 @@ private:
|
|||||||
public:
|
public:
|
||||||
explicit CInstantSendManager(CChainLocksHandler& _clhandler, CChainState& chainstate, CConnman& _connman,
|
explicit CInstantSendManager(CChainLocksHandler& _clhandler, CChainState& chainstate, CConnman& _connman,
|
||||||
CQuorumManager& _qman, CSigningManager& _sigman, CSigSharesManager& _shareman,
|
CQuorumManager& _qman, CSigningManager& _sigman, CSigSharesManager& _shareman,
|
||||||
CSporkManager& sporkManager, CTxMemPool& _mempool, const CMasternodeSync& mn_sync,
|
CSporkManager& sporkman, CTxMemPool& _mempool, const CMasternodeSync& mn_sync,
|
||||||
bool unitTests, bool fWipe) :
|
bool unitTests, bool fWipe) :
|
||||||
db(unitTests, fWipe),
|
db(unitTests, fWipe),
|
||||||
clhandler(_clhandler), m_chainstate(chainstate), connman(_connman), qman(_qman), sigman(_sigman),
|
clhandler(_clhandler), m_chainstate(chainstate), connman(_connman), qman(_qman), sigman(_sigman),
|
||||||
shareman(_shareman), spork_manager(sporkManager), mempool(_mempool), m_mn_sync(mn_sync)
|
shareman(_shareman), spork_manager(sporkman), mempool(_mempool), m_mn_sync(mn_sync)
|
||||||
{
|
{
|
||||||
workInterrupt.reset();
|
workInterrupt.reset();
|
||||||
}
|
}
|
||||||
|
@ -215,14 +215,14 @@ void CSigSharesManager::InterruptWorkerThread()
|
|||||||
workInterrupt();
|
workInterrupt();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSigSharesManager::ProcessMessage(const CNode& pfrom, const CSporkManager& sporkManager, const std::string& msg_type, CDataStream& vRecv)
|
void CSigSharesManager::ProcessMessage(const CNode& pfrom, const CSporkManager& sporkman, const std::string& msg_type, CDataStream& vRecv)
|
||||||
{
|
{
|
||||||
// non-masternodes are not interested in sigshares
|
// non-masternodes are not interested in sigshares
|
||||||
if (!fMasternodeMode || WITH_LOCK(activeMasternodeInfoCs, return activeMasternodeInfo.proTxHash.IsNull())) {
|
if (!fMasternodeMode || WITH_LOCK(activeMasternodeInfoCs, return activeMasternodeInfo.proTxHash.IsNull())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sporkManager.IsSporkActive(SPORK_21_QUORUM_ALL_CONNECTED) && msg_type == NetMsgType::QSIGSHARE) {
|
if (sporkman.IsSporkActive(SPORK_21_QUORUM_ALL_CONNECTED) && msg_type == NetMsgType::QSIGSHARE) {
|
||||||
std::vector<CSigShare> receivedSigShares;
|
std::vector<CSigShare> receivedSigShares;
|
||||||
vRecv >> receivedSigShares;
|
vRecv >> receivedSigShares;
|
||||||
|
|
||||||
|
@ -424,7 +424,7 @@ public:
|
|||||||
void UnregisterAsRecoveredSigsListener();
|
void UnregisterAsRecoveredSigsListener();
|
||||||
void InterruptWorkerThread();
|
void InterruptWorkerThread();
|
||||||
|
|
||||||
void ProcessMessage(const CNode& pnode, const CSporkManager& sporkManager, const std::string& msg_type, CDataStream& vRecv);
|
void ProcessMessage(const CNode& pnode, const CSporkManager& sporkman, const std::string& msg_type, CDataStream& vRecv);
|
||||||
|
|
||||||
void AsyncSign(const CQuorumCPtr& quorum, const uint256& id, const uint256& msgHash);
|
void AsyncSign(const CQuorumCPtr& quorum, const uint256& id, const uint256& msgHash);
|
||||||
std::optional<CSigShare> CreateSigShare(const CQuorumCPtr& quorum, const uint256& id, const uint256& msgHash) const;
|
std::optional<CSigShare> CreateSigShare(const CQuorumCPtr& quorum, const uint256& id, const uint256& msgHash) const;
|
||||||
|
Loading…
Reference in New Issue
Block a user