mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
refactoring: move LoadChainTip to CChainState method
This commit is contained in:
parent
f5809d5b13
commit
bcf73d3b84
3 changed files with 18 additions and 14 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue