mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-13 07:28:59 +01:00
refactoring: move LoadChainTip to CChainState method
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user