disable sync-retry
This commit is contained in:
parent
3a72bea5b3
commit
3f4727716a
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user