mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 04:52:59 +01:00
Fix mnsync in regtest (#2202)
This commit is contained in:
parent
d4d11476aa
commit
c4ee2c89ef
@ -184,22 +184,21 @@ void CMasternodeSync::ProcessTick(CConnman& connman)
|
|||||||
// QUICK MODE (REGTEST ONLY!)
|
// QUICK MODE (REGTEST ONLY!)
|
||||||
if(Params().NetworkIDString() == CBaseChainParams::REGTEST)
|
if(Params().NetworkIDString() == CBaseChainParams::REGTEST)
|
||||||
{
|
{
|
||||||
if(nRequestedMasternodeAttempt <= 2) {
|
if (nRequestedMasternodeAssets == MASTERNODE_SYNC_WAITING) {
|
||||||
connman.PushMessage(pnode, msgMaker.Make(NetMsgType::GETSPORKS)); //get current network sporks
|
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);
|
mnodeman.DsegUpdate(pnode, connman);
|
||||||
} else if(nRequestedMasternodeAttempt < 6) {
|
} else if (nRequestedMasternodeAssets == MASTERNODE_SYNC_MNW) {
|
||||||
//sync payment votes
|
//sync payment votes
|
||||||
if(pnode->nVersion == 70208) {
|
if(pnode->nVersion == 70208) {
|
||||||
connman.PushMessage(pnode, msgMaker.Make(NetMsgType::MASTERNODEPAYMENTSYNC, mnpayments.GetStorageLimit())); //sync payment votes
|
connman.PushMessage(pnode, msgMaker.Make(NetMsgType::MASTERNODEPAYMENTSYNC, mnpayments.GetStorageLimit())); //sync payment votes
|
||||||
} else {
|
} else {
|
||||||
connman.PushMessage(pnode, msgMaker.Make(NetMsgType::MASTERNODEPAYMENTSYNC)); //sync payment votes
|
connman.PushMessage(pnode, msgMaker.Make(NetMsgType::MASTERNODEPAYMENTSYNC)); //sync payment votes
|
||||||
}
|
}
|
||||||
|
} else if (nRequestedMasternodeAssets == MASTERNODE_SYNC_GOVERNANCE) {
|
||||||
SendGovernanceSyncRequest(pnode, connman);
|
SendGovernanceSyncRequest(pnode, connman);
|
||||||
} else {
|
|
||||||
nRequestedMasternodeAssets = MASTERNODE_SYNC_FINISHED;
|
|
||||||
}
|
}
|
||||||
nRequestedMasternodeAttempt++;
|
SwitchToNextAsset(connman);
|
||||||
connman.ReleaseNodeVector(vNodesCopy);
|
connman.ReleaseNodeVector(vNodesCopy);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user