fix condition for a recent block in mn sync

This commit is contained in:
UdjinM6 2015-07-19 17:51:37 +03:00
parent b1f19c7e82
commit 5f9c676e05

View File

@ -97,7 +97,7 @@ void CMasternodeSync::Process()
{
//set to synced
if(Params().NetworkID() == CBaseChainParams::REGTEST && c >= 10) {
if(Params().NetworkID() == CBaseChainParams::REGTEST && tick >= 10) {
LogPrintf("CMasternodeSync::Process - Sync has finished\n");
RequestedMasternodeAssets = MASTERNODE_SYNC_FINISHED;
RequestedMasternodeAttempt = 0;
@ -116,7 +116,7 @@ void CMasternodeSync::Process()
}
//don't begin syncing until we're almost at a recent block
if(pindexPrev->nHeight + 4 < pindexBestHeader->nHeight || pindexPrev->nTime + 600 < GetTime()) return;
if(pindexPrev->nHeight + 4 < pindexBestHeader->nHeight && pindexPrev->nTime + 600 < GetTime()) return;
if (pnode->nVersion >= nMasternodeMinProtocol) {