Fix mnsync in regtest (#2202)

This commit is contained in:
UdjinM6 2018-08-04 16:39:15 +03:00 committed by GitHub
parent d4d11476aa
commit c4ee2c89ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -184,22 +184,21 @@ void CMasternodeSync::ProcessTick(CConnman& connman)
// QUICK MODE (REGTEST ONLY!)
if(Params().NetworkIDString() == CBaseChainParams::REGTEST)
{
if(nRequestedMasternodeAttempt <= 2) {
if (nRequestedMasternodeAssets == MASTERNODE_SYNC_WAITING) {
connman.PushMessage(pnode, msgMaker.Make(NetMsgType::GETSPORKS)); //get current network sporks
} else if(nRequestedMasternodeAttempt < 4) {
} else if (nRequestedMasternodeAssets == MASTERNODE_SYNC_LIST) {
mnodeman.DsegUpdate(pnode, connman);
} else if(nRequestedMasternodeAttempt < 6) {
} else if (nRequestedMasternodeAssets == MASTERNODE_SYNC_MNW) {
//sync payment votes
if(pnode->nVersion == 70208) {
connman.PushMessage(pnode, msgMaker.Make(NetMsgType::MASTERNODEPAYMENTSYNC, mnpayments.GetStorageLimit())); //sync payment votes
} else {
connman.PushMessage(pnode, msgMaker.Make(NetMsgType::MASTERNODEPAYMENTSYNC)); //sync payment votes
}
} else if (nRequestedMasternodeAssets == MASTERNODE_SYNC_GOVERNANCE) {
SendGovernanceSyncRequest(pnode, connman);
} else {
nRequestedMasternodeAssets = MASTERNODE_SYNC_FINISHED;
}
nRequestedMasternodeAttempt++;
SwitchToNextAsset(connman);
connman.ReleaseNodeVector(vNodesCopy);
return;
}