Skip to content

Commit

Permalink
Init: Error out at startup if there was an internal problem during DM…
Browse files Browse the repository at this point in the history
…N init.
  • Loading branch information
furszy committed Feb 20, 2022
1 parent 5bc3245 commit 1bba830
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/tiertwo/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,9 @@ bool InitActiveMN()
// Init active masternode
const CBlockIndex* pindexTip = WITH_LOCK(cs_main, return chainActive.Tip(););
activeMasternodeManager->Init(pindexTip);
if (activeMasternodeManager->GetState() == CActiveDeterministicMasternodeManager::MASTERNODE_ERROR) {
return UIError(activeMasternodeManager->GetStatus()); // state logged internally
}
} else {
// Check enforcement
if (deterministicMNManager->LegacyMNObsolete()) {
Expand Down

0 comments on commit 1bba830

Please sign in to comment.