From bcf73d3b84649c8786f0cccc6862dd1bbdb9950b Mon Sep 17 00:00:00 2001 From: James O'Beirne Date: Fri, 29 Mar 2019 14:09:55 -0400 Subject: refactoring: move LoadChainTip to CChainState method --- src/init.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/init.cpp') diff --git a/src/init.cpp b/src/init.cpp index bb8213054..d7b09b5e4 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1557,8 +1557,8 @@ bool AppInitMain(InitInterfaces& interfaces) is_coinsview_empty = fReset || fReindexChainState || ::ChainstateActive().CoinsTip().GetBestBlock().IsNull(); if (!is_coinsview_empty) { - // LoadChainTip sets ::ChainActive() based on CoinsTip()'s best block - if (!LoadChainTip(chainparams)) { + // LoadChainTip initializes the chain based on CoinsTip()'s best block + if (!::ChainstateActive().LoadChainTip(chainparams)) { strLoadError = _("Error initializing block database").translated; break; } -- cgit v1.2.3 From 3cf36736e540cf06250701f0934a7946836d000d Mon Sep 17 00:00:00 2001 From: James O'Beirne Date: Fri, 29 Mar 2019 16:43:59 -0400 Subject: refactoring: move ReplayBlocks under CChainState --- src/init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/init.cpp') diff --git a/src/init.cpp b/src/init.cpp index d7b09b5e4..7c752d615 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1545,7 +1545,7 @@ bool AppInitMain(InitInterfaces& interfaces) } // ReplayBlocks is a no-op if we cleared the coinsviewdb with -reindex or -reindex-chainstate - if (!ReplayBlocks(chainparams, &::ChainstateActive().CoinsDB())) { + if (!::ChainstateActive().ReplayBlocks(chainparams)) { strLoadError = _("Unable to replay blocks. You will need to rebuild the database using -reindex-chainstate.").translated; break; } -- cgit v1.2.3