refactoring: move LoadChainTip to CChainState method

This commit is contained in:
James O'Beirne
2019-03-29 14:09:55 -04:00
parent f5809d5b13
commit bcf73d3b84
3 changed files with 18 additions and 14 deletions

View File

@@ -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;
}