feat: regtest-only: do not auto-reset mnsync after 1h

This commit is contained in:
UdjinM6 2024-08-30 15:30:37 +03:00
parent 6d426515a5
commit 1937f503fe
No known key found for this signature in database
GPG Key ID: 83592BD1400D58D9

View File

@ -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) // 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(); 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"); LogPrintf("CMasternodeSync::ProcessTick -- WARNING: no actions for too long, restarting sync...\n");
Reset(true); Reset(true);
nTimeLastProcess = GetTime(); nTimeLastProcess = GetTime();