From 1937f503fe47fcf205914ce9ce18c5a42fb17906 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Fri, 30 Aug 2024 15:30:37 +0300 Subject: [PATCH] feat: regtest-only: do not auto-reset mnsync after 1h --- src/masternode/sync.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/masternode/sync.cpp b/src/masternode/sync.cpp index b4fc5440bf..fefc12730d 100644 --- a/src/masternode/sync.cpp +++ b/src/masternode/sync.cpp @@ -127,7 +127,7 @@ void CMasternodeSync::ProcessTick(const PeerManager& peerman) // reset the sync process if the last call to this function was more than 60 minutes ago (client was in sleep mode) static int64_t nTimeLastProcess = GetTime(); - if(GetTime() - nTimeLastProcess > 60*60 && !fMasternodeMode) { + if (!Params().IsMockableChain() && GetTime() - nTimeLastProcess > 60 * 60 && !fMasternodeMode) { LogPrintf("CMasternodeSync::ProcessTick -- WARNING: no actions for too long, restarting sync...\n"); Reset(true); nTimeLastProcess = GetTime();