Skip to content

Commit 89d14c5

Browse files
thelazierUdjinM6
authored andcommitted
Fix Hot Masternode Starting (dashpay#1239)
1 parent 7815f6e commit 89d14c5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/activemasternode.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ void CActiveMasternode::ManageState()
4040
if(eType == MASTERNODE_REMOTE) {
4141
ManageStateRemote();
4242
} else if(eType == MASTERNODE_LOCAL) {
43-
ManageStateLocal();
43+
// Try Remote Start first so the started local masternode can be restarted without recreate masternode broadcast.
44+
ManageStateRemote();
45+
if(nState != ACTIVE_MASTERNODE_STARTED)
46+
ManageStateLocal();
4447
}
4548

4649
SendMasternodePing();
@@ -301,9 +304,6 @@ void CActiveMasternode::ManageStateLocal()
301304
fPingerEnabled = true;
302305
nState = ACTIVE_MASTERNODE_STARTED;
303306

304-
masternode_info_t infoMn = mnodeman.GetMasternodeInfo(pubKeyMasternode);
305-
if(infoMn.fInfoValid && CMasternode::IsValidStateForAutoStart(infoMn.nActiveState)) return; // sending ping should be enough
306-
307307
//update to masternode list
308308
LogPrintf("CActiveMasternode::ManageStateLocal -- Update Masternode List\n");
309309
mnodeman.UpdateMasternodeList(mnb);

0 commit comments

Comments
 (0)