diff --git a/qa/rpc-tests/llmq-chainlocks.py b/qa/rpc-tests/llmq-chainlocks.py index 0980febd9c..cdb76ad74a 100755 --- a/qa/rpc-tests/llmq-chainlocks.py +++ b/qa/rpc-tests/llmq-chainlocks.py @@ -17,7 +17,7 @@ Checks LLMQs based ChainLocks class LLMQChainLocksTest(DashTestFramework): def __init__(self): - super().__init__(11, 10, [], fast_dip3_activation=True) + super().__init__(11, 10, [], fast_dip3_enforcement=True) def run_test(self): diff --git a/src/llmq/quorums_dkgsessionhandler.cpp b/src/llmq/quorums_dkgsessionhandler.cpp index e7220127c9..f2cf23c707 100644 --- a/src/llmq/quorums_dkgsessionhandler.cpp +++ b/src/llmq/quorums_dkgsessionhandler.cpp @@ -123,9 +123,6 @@ void CDKGSessionHandler::UpdatedBlockTip(const CBlockIndex* pindexNew, const CBl int phaseInt = quorumStageInt / params.dkgPhaseBlocks + 1; if (fNewPhase && phaseInt >= QuorumPhase_Initialized && phaseInt <= QuorumPhase_Idle) { phase = static_cast(phaseInt); - if (phase == QuorumPhase_Initialized) { - quorumDKGDebugManager->ResetLocalSessionStatus(params.type, quorumHash, quorumHeight); - } } quorumDKGDebugManager->UpdateLocalStatus([&](CDKGDebugStatus& status) { @@ -133,11 +130,6 @@ void CDKGSessionHandler::UpdatedBlockTip(const CBlockIndex* pindexNew, const CBl status.nHeight = (uint32_t)pindexNew->nHeight; return changed; }); - quorumDKGDebugManager->UpdateLocalSessionStatus(params.type, [&](CDKGDebugSessionStatus& status) { - bool changed = status.phase != (uint8_t)phase; - status.phase = (uint8_t)phase; - return changed; - }); } void CDKGSessionHandler::ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStream& vRecv, CConnman& connman) @@ -199,7 +191,7 @@ void CDKGSessionHandler::WaitForNextPhase(QuorumPhase curPhase, throw AbortPhaseException(); } if (p.first == nextPhase) { - return; + break; } if (curPhase != QuorumPhase_None && p.first != curPhase) { throw AbortPhaseException(); @@ -208,6 +200,15 @@ void CDKGSessionHandler::WaitForNextPhase(QuorumPhase curPhase, MilliSleep(100); } } + + if (nextPhase == QuorumPhase_Initialized) { + quorumDKGDebugManager->ResetLocalSessionStatus(params.type, quorumHash, quorumHeight); + } + quorumDKGDebugManager->UpdateLocalSessionStatus(params.type, [&](CDKGDebugSessionStatus& status) { + bool changed = status.phase != (uint8_t)nextPhase; + status.phase = (uint8_t)nextPhase; + return changed; + }); } void CDKGSessionHandler::WaitForNewQuorum(const uint256& oldQuorumHash)