From 04ba1640642f84955862645c2f5699467e7a90e8 Mon Sep 17 00:00:00 2001 From: pasta Date: Mon, 22 Apr 2024 10:04:52 -0500 Subject: [PATCH] refactor: immediately update lastCleanupTime --- src/llmq/chainlocks.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/llmq/chainlocks.cpp b/src/llmq/chainlocks.cpp index 1c44c259c3..50068f0942 100644 --- a/src/llmq/chainlocks.cpp +++ b/src/llmq/chainlocks.cpp @@ -619,6 +619,7 @@ void CChainLocksHandler::Cleanup() if (GetTimeMillis() - lastCleanupTime < CLEANUP_INTERVAL) { return; } + lastCleanupTime = GetTimeMillis(); { LOCK(cs); @@ -665,8 +666,6 @@ void CChainLocksHandler::Cleanup() ++it; } } - - lastCleanupTime = GetTimeMillis(); } bool AreChainLocksEnabled(const CSporkManager& sporkman)