Use !fMasternode to disable restart of mnsync instead of checking for regtest

This commit is contained in:
Alexander Block 2020-03-31 19:53:46 +02:00
parent 19e3e8733d
commit 97ffcd369d

View File

@ -115,7 +115,7 @@ void CMasternodeSync::ProcessTick(CConnman& connman)
// 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 && Params().NetworkIDString() != CBaseChainParams::REGTEST) {
if(GetTime() - nTimeLastProcess > 60*60 && !fMasternodeMode) {
LogPrintf("CMasternodeSync::ProcessTick -- WARNING: no actions for too long, restarting sync...\n");
Reset();
SwitchToNextAsset(connman);