Skip to content

Commit

Permalink
disable sync-retry
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Duffield committed Jul 30, 2015
1 parent 3a72bea commit 3f47277
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/masternode-sync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,19 +278,19 @@ void CMasternodeSync::Process()
if(RequestedMasternodeAssets == MASTERNODE_SYNC_BUDGET){
//we'll start rejecting votes if we accidentally get set as synced too soon
if(lastBudgetItem > 0 && lastBudgetItem < GetTime() - MASTERNODE_SYNC_TIMEOUT && RequestedMasternodeAttempt >= 4){ //hasn't received a new item in the last five seconds, so we'll move to the
LogPrintf("CMasternodeSync::Process - HasNextFinalizedBudget %d nCountFailures %d IsBudgetPropEmpty %d\n", budget.HasNextFinalizedBudget(), nCountFailures, IsBudgetPropEmpty());
if(budget.HasNextFinalizedBudget() || nCountFailures >= 2 || IsBudgetPropEmpty()) {
//LogPrintf("CMasternodeSync::Process - HasNextFinalizedBudget %d nCountFailures %d IsBudgetPropEmpty %d\n", budget.HasNextFinalizedBudget(), nCountFailures, IsBudgetPropEmpty());
//if(budget.HasNextFinalizedBudget() || nCountFailures >= 2 || IsBudgetPropEmpty()) {
GetNextAsset();

//try to activate our masternode if possible
activeMasternode.ManageStatus();
} else { //we've failed to sync, this state will reject the next budget block
LogPrintf("CMasternodeSync::Process - ERROR - Sync has failed, will retry later\n");
RequestedMasternodeAssets = MASTERNODE_SYNC_FAILED;
RequestedMasternodeAttempt = 0;
lastFailure = GetTime();
nCountFailures++;
}
// } else { //we've failed to sync, this state will reject the next budget block
// LogPrintf("CMasternodeSync::Process - ERROR - Sync has failed, will retry later\n");
// RequestedMasternodeAssets = MASTERNODE_SYNC_FAILED;
// RequestedMasternodeAttempt = 0;
// lastFailure = GetTime();
// nCountFailures++;
// }
return;
}

Expand Down

0 comments on commit 3f47277

Please sign in to comment.