From 5132c11cb07f6aae3e78b295a7cc340f8ed0ac0b Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Mon, 27 Nov 2023 21:13:06 +0300 Subject: [PATCH] fix: use correct interruption condition in `StartCachePopulatorThread` (#5732) ## Issue being fixed or feature implemented https://github.com/dashpay/dash/pull/4788#discussion_r854468664 noticed while working on #5731 ## What was done? ## How Has This Been Tested? run a node, check logs - there is a meaningful time span between `start` and `done` now and not just zeros all the time. ## Breaking Changes ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ --- src/llmq/quorums.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/llmq/quorums.cpp b/src/llmq/quorums.cpp index a5f58c922a..49c6fcd215 100644 --- a/src/llmq/quorums.cpp +++ b/src/llmq/quorums.cpp @@ -824,7 +824,7 @@ void CQuorumManager::StartCachePopulatorThread(const CQuorumCPtr pQuorum) const // when then later some other thread tries to get keys, it will be much faster workerPool.push([pQuorum, t, this](int threadId) { for (const auto i : irange::range(pQuorum->members.size())) { - if (!quorumThreadInterrupt) { + if (quorumThreadInterrupt) { break; } if (pQuorum->qc->validMembers[i]) {