From 89d14c5274df04350956d83b0a2ff6f3ec05f102 Mon Sep 17 00:00:00 2001 From: TheLazieR Yip Date: Sun, 1 Jan 2017 17:18:21 +0700 Subject: [PATCH] Fix Hot Masternode Starting (#1239) --- src/activemasternode.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/activemasternode.cpp b/src/activemasternode.cpp index cd8350173a..cacb7c03dd 100644 --- a/src/activemasternode.cpp +++ b/src/activemasternode.cpp @@ -40,7 +40,10 @@ void CActiveMasternode::ManageState() if(eType == MASTERNODE_REMOTE) { ManageStateRemote(); } else if(eType == MASTERNODE_LOCAL) { - ManageStateLocal(); + // Try Remote Start first so the started local masternode can be restarted without recreate masternode broadcast. + ManageStateRemote(); + if(nState != ACTIVE_MASTERNODE_STARTED) + ManageStateLocal(); } SendMasternodePing(); @@ -301,9 +304,6 @@ void CActiveMasternode::ManageStateLocal() fPingerEnabled = true; nState = ACTIVE_MASTERNODE_STARTED; - masternode_info_t infoMn = mnodeman.GetMasternodeInfo(pubKeyMasternode); - if(infoMn.fInfoValid && CMasternode::IsValidStateForAutoStart(infoMn.nActiveState)) return; // sending ping should be enough - //update to masternode list LogPrintf("CActiveMasternode::ManageStateLocal -- Update Masternode List\n"); mnodeman.UpdateMasternodeList(mnb);