From f7a9b0df41b7a08042e274bdd44b2b3289591422 Mon Sep 17 00:00:00 2001 From: Pasta Date: Sun, 22 Sep 2019 09:28:59 -0500 Subject: [PATCH] move `deterministicMNManager->UpgradeDBIfNeeded();` to be after LoadChainTip Signed-off-by: Pasta --- src/init.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/init.cpp b/src/init.cpp index ed08f180b..c9275093b 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1827,7 +1827,6 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler) // The on-disk coinsdb is now in a good state, create the cache pcoinsTip = new CCoinsViewCache(pcoinscatcher); - deterministicMNManager->UpgradeDBIfNeeded(); bool is_coinsview_empty = fReset || fReindexChainState || pcoinsTip->GetBestBlock().IsNull(); if (!is_coinsview_empty) { // LoadChainTip sets chainActive based on pcoinsTip's best block @@ -1838,6 +1837,8 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler) assert(chainActive.Tip() != NULL); } + deterministicMNManager->UpgradeDBIfNeeded(); + if (!is_coinsview_empty) { uiInterface.InitMessage(_("Verifying blocks...")); if (fHavePruned && gArgs.GetArg("-checkblocks", DEFAULT_CHECKBLOCKS) > MIN_BLOCKS_TO_KEEP) {