mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
chore: sync chainstate loading logic with upstream
Match formatting with what upcoming commits expect to limit conflicts
This commit is contained in:
parent
e2095bd68a
commit
620146bcb8
13
src/init.cpp
13
src/init.cpp
@ -1869,9 +1869,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
|
|||||||
uiInterface.InitMessage(_("Loading block index…").translated);
|
uiInterface.InitMessage(_("Loading block index…").translated);
|
||||||
|
|
||||||
do {
|
do {
|
||||||
bool failed_verification = false;
|
|
||||||
const auto load_block_index_start_time{SteadyClock::now()};
|
const auto load_block_index_start_time{SteadyClock::now()};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
LOCK(cs_main);
|
LOCK(cs_main);
|
||||||
|
|
||||||
@ -1997,6 +1995,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
|
|||||||
// block tree into BlockIndex()!
|
// block tree into BlockIndex()!
|
||||||
|
|
||||||
bool failed_chainstate_init = false;
|
bool failed_chainstate_init = false;
|
||||||
|
|
||||||
for (CChainState* chainstate : chainman.GetAll()) {
|
for (CChainState* chainstate : chainman.GetAll()) {
|
||||||
chainstate->InitCoinsDB(
|
chainstate->InitCoinsDB(
|
||||||
/* cache_size_bytes */ nCoinDBCache,
|
/* cache_size_bytes */ nCoinDBCache,
|
||||||
@ -2065,6 +2064,16 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
|
|||||||
strLoadError = _("Error upgrading evo database for EHF");
|
strLoadError = _("Error upgrading evo database for EHF");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
} catch (const std::exception& e) {
|
||||||
|
LogPrintf("%s\n", e.what());
|
||||||
|
strLoadError = _("Error opening block database");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool failed_verification = false;
|
||||||
|
|
||||||
|
try {
|
||||||
|
LOCK(cs_main);
|
||||||
|
|
||||||
for (CChainState* chainstate : chainman.GetAll()) {
|
for (CChainState* chainstate : chainman.GetAll()) {
|
||||||
if (!is_coinsview_empty(chainstate)) {
|
if (!is_coinsview_empty(chainstate)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user