Fix sync in regtest (again) (#2241)
Should only call SwitchToNextAsset() while being in specific state and not on every tick
This commit is contained in:
parent
28ba2ad0fb
commit
40eee1775f
@ -186,8 +186,10 @@ void CMasternodeSync::ProcessTick(CConnman& connman)
|
|||||||
{
|
{
|
||||||
if (nRequestedMasternodeAssets == MASTERNODE_SYNC_WAITING) {
|
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
|
||||||
|
SwitchToNextAsset(connman);
|
||||||
} else if (nRequestedMasternodeAssets == MASTERNODE_SYNC_LIST) {
|
} else if (nRequestedMasternodeAssets == MASTERNODE_SYNC_LIST) {
|
||||||
mnodeman.DsegUpdate(pnode, connman);
|
mnodeman.DsegUpdate(pnode, connman);
|
||||||
|
SwitchToNextAsset(connman);
|
||||||
} else if (nRequestedMasternodeAssets == MASTERNODE_SYNC_MNW) {
|
} else if (nRequestedMasternodeAssets == MASTERNODE_SYNC_MNW) {
|
||||||
//sync payment votes
|
//sync payment votes
|
||||||
if(pnode->nVersion == 70208) {
|
if(pnode->nVersion == 70208) {
|
||||||
@ -195,10 +197,11 @@ void CMasternodeSync::ProcessTick(CConnman& connman)
|
|||||||
} else {
|
} else {
|
||||||
connman.PushMessage(pnode, msgMaker.Make(NetMsgType::MASTERNODEPAYMENTSYNC)); //sync payment votes
|
connman.PushMessage(pnode, msgMaker.Make(NetMsgType::MASTERNODEPAYMENTSYNC)); //sync payment votes
|
||||||
}
|
}
|
||||||
|
SwitchToNextAsset(connman);
|
||||||
} else if (nRequestedMasternodeAssets == MASTERNODE_SYNC_GOVERNANCE) {
|
} else if (nRequestedMasternodeAssets == MASTERNODE_SYNC_GOVERNANCE) {
|
||||||
SendGovernanceSyncRequest(pnode, connman);
|
SendGovernanceSyncRequest(pnode, connman);
|
||||||
|
SwitchToNextAsset(connman);
|
||||||
}
|
}
|
||||||
SwitchToNextAsset(connman);
|
|
||||||
connman.ReleaseNodeVector(vNodesCopy);
|
connman.ReleaseNodeVector(vNodesCopy);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user