diff --git a/src/llmq/quorums.cpp b/src/llmq/quorums.cpp index 5fe86f314b4eb..0fde2f582e0c0 100644 --- a/src/llmq/quorums.cpp +++ b/src/llmq/quorums.cpp @@ -1019,8 +1019,7 @@ void CQuorumManager::StartCleanupOldQuorumDataThread(const CBlockIndex* pIndex) if (quorumThreadInterrupt) { break; } - const auto vecQuorums = ScanQuorums(params.type, pIndex, params.keepOldKeys); - for (const auto& pQuorum : vecQuorums) { + for (const auto& pQuorum : ScanQuorums(params.type, pIndex, params.keepOldKeys)) { dbKeysToSkip.insert(MakeQuorumKey(*pQuorum)); } }