Do not switch from MASTERNODE_SYNC_SPORKS to next asset until blockchain is synced
This commit is contained in:
parent
174ee8f880
commit
cfeda84a3c
@ -203,7 +203,9 @@ void CMasternodeSync::ProcessTick()
|
||||
TRY_LOCK(cs_vNodes, lockRecv);
|
||||
if(!lockRecv) return;
|
||||
|
||||
if(nRequestedMasternodeAssets == MASTERNODE_SYNC_INITIAL) {
|
||||
if(nRequestedMasternodeAssets == MASTERNODE_SYNC_INITIAL ||
|
||||
(nRequestedMasternodeAssets == MASTERNODE_SYNC_SPORKS && IsBlockchainSynced()))
|
||||
{
|
||||
SwitchToNextAsset();
|
||||
}
|
||||
|
||||
@ -245,10 +247,6 @@ void CMasternodeSync::ProcessTick()
|
||||
netfulfilledman.AddFulfilledRequest(pnode->addr, "spork-sync");
|
||||
// get current network sporks
|
||||
pnode->PushMessage(NetMsgType::GETSPORKS);
|
||||
|
||||
// we always ask for sporks, so just skip this
|
||||
if(nRequestedMasternodeAssets == MASTERNODE_SYNC_SPORKS) SwitchToNextAsset();
|
||||
|
||||
continue; // always get sporks first, switch to the next node without waiting for the next tick
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user