Small syncing improvement

This commit is contained in:
Evan Duffield 2015-07-17 21:38:15 -07:00
parent 494afeef50
commit 916deaa398
2 changed files with 4 additions and 1 deletions

View File

@ -722,6 +722,8 @@ CAmount CBudgetManager::GetTotalBudget(int nHeight)
void CBudgetManager::NewBlock() void CBudgetManager::NewBlock()
{ {
if(!masternodeSync.IsSynced()) return;
CheckAndRemove(); CheckAndRemove();
if (strBudgetMode == "suggest") { //suggest the budget we see if (strBudgetMode == "suggest") { //suggest the budget we see

View File

@ -107,7 +107,8 @@ void CMasternodeSync::Process()
return; return;
} }
if(IsInitialBlockDownload()) return; //don't begin syncing until we're at a recent block
if(pindexPrev->nTime + 600 < GetTime()) return;
if(RequestedMasternodeAssets == MASTERNODE_SYNC_LIST){ if(RequestedMasternodeAssets == MASTERNODE_SYNC_LIST){
if(lastMasternodeList > 0 && lastMasternodeList < GetTime() - MASTERNODE_SYNC_TIMEOUT){ //hasn't received a new item in the last five seconds, so we'll move to the if(lastMasternodeList > 0 && lastMasternodeList < GetTime() - MASTERNODE_SYNC_TIMEOUT){ //hasn't received a new item in the last five seconds, so we'll move to the