Skip to content

Commit c7e2beb

Browse files
UdjinM6panleone
authored andcommitted
scripted-diff: Refactor llmq type consensus param names (dashpay#3093)
-BEGIN VERIFY SCRIPT- sed -i 's/llmqChainLocks/llmqTypeChainLocks/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h sed -i 's/llmqForInstantSend/llmqTypeInstantSend/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h -END VERIFY SCRIPT-
1 parent af7bb99 commit c7e2beb

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/chainparams.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ class CMainParams : public CChainParams
358358

359359
nLLMQConnectionRetryTimeout = 60;
360360

361-
consensus.llmqChainLocks = Consensus::LLMQ_400_60;
361+
consensus.llmqTypeChainLocks = Consensus::LLMQ_400_60;
362362

363363
// Tier two
364364
nFulfilledRequestExpireTime = 60 * 60; // fulfilled requests expire in 1 hour
@@ -505,7 +505,7 @@ class CTestNetParams : public CChainParams
505505

506506
nLLMQConnectionRetryTimeout = 60;
507507

508-
consensus.llmqChainLocks = Consensus::LLMQ_400_60;
508+
consensus.llmqTypeChainLocks = Consensus::LLMQ_400_60;
509509

510510
// Tier two
511511
nFulfilledRequestExpireTime = 60 * 60; // fulfilled requests expire in 1 hour
@@ -649,7 +649,7 @@ class CRegTestParams : public CChainParams
649649
consensus.llmqs[Consensus::LLMQ_TEST] = llmq_test;
650650
nLLMQConnectionRetryTimeout = 10;
651651

652-
consensus.llmqChainLocks = Consensus::LLMQ_TEST;
652+
consensus.llmqTypeChainLocks = Consensus::LLMQ_TEST;
653653

654654
// Tier two
655655
nFulfilledRequestExpireTime = 60 * 60; // fulfilled requests expire in 1 hour

src/consensus/params.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ struct Params {
278278
// LLMQ
279279
std::map<LLMQType, LLMQParams> llmqs;
280280
Optional<LLMQParams> GetLLMQParams(uint8_t llmqtype) const;
281-
LLMQType llmqChainLocks;
281+
LLMQType llmqTypeChainLocks;
282282
};
283283
} // namespace Consensus
284284

src/llmq/quorums_chainlocks.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ void CChainLocksHandler::ProcessNewChainLock(NodeId from, const llmq::CChainLock
109109

110110
uint256 requestId = ::SerializeHash(std::make_pair(CLSIG_REQUESTID_PREFIX, clsig.nHeight));
111111
uint256 msgHash = clsig.blockHash;
112-
if (!quorumSigningManager->VerifyRecoveredSig(Params().GetConsensus().llmqChainLocks, clsig.nHeight, requestId, msgHash, clsig.sig)) {
112+
if (!quorumSigningManager->VerifyRecoveredSig(Params().GetConsensus().llmqTypeChainLocks, clsig.nHeight, requestId, msgHash, clsig.sig)) {
113113
LogPrintf("CChainLocksHandler::%s -- invalid CLSIG (%s), peer=%d\n", __func__, clsig.ToString(), from);
114114
if (from != -1) {
115115
LOCK(cs_main);
@@ -270,7 +270,7 @@ void CChainLocksHandler::TrySignChainTip()
270270
lastSignedMsgHash = msgHash;
271271
}
272272

273-
quorumSigningManager->AsyncSignIfMember(Params().GetConsensus().llmqChainLocks, requestId, msgHash);
273+
quorumSigningManager->AsyncSignIfMember(Params().GetConsensus().llmqTypeChainLocks, requestId, msgHash);
274274
}
275275

276276
// WARNING: cs_main and cs should not be held!

src/llmq/quorums_signing.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ CQuorumCPtr CSigningManager::SelectQuorumForSigning(Consensus::LLMQType llmqType
842842

843843
bool CSigningManager::VerifyRecoveredSig(Consensus::LLMQType llmqType, int signedAtHeight, const uint256& id, const uint256& msgHash, const CBLSSignature& sig)
844844
{
845-
auto& llmqParams = Params().GetConsensus().llmqs.at(Params().GetConsensus().llmqChainLocks);
845+
auto& llmqParams = Params().GetConsensus().llmqs.at(Params().GetConsensus().llmqTypeChainLocks);
846846

847847
auto quorum = SelectQuorumForSigning(llmqParams.type, signedAtHeight, id);
848848
if (!quorum) {

0 commit comments

Comments
 (0)