mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
index: Avoid async shutdown on init error
This commit is contained in:
parent
2e30e328a7
commit
faad68fcd4
7 changed files with 23 additions and 17 deletions
12
src/init.cpp
12
src/init.cpp
|
|
@ -1550,17 +1550,23 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
|
|||
// ********************************************************* Step 8: start indexers
|
||||
if (args.GetBoolArg("-txindex", DEFAULT_TXINDEX)) {
|
||||
g_txindex = std::make_unique<TxIndex>(nTxIndexCache, false, fReindex);
|
||||
g_txindex->Start();
|
||||
if (!g_txindex->Start()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
for (const auto& filter_type : g_enabled_filter_types) {
|
||||
InitBlockFilterIndex(filter_type, filter_index_cache, false, fReindex);
|
||||
GetBlockFilterIndex(filter_type)->Start();
|
||||
if (!GetBlockFilterIndex(filter_type)->Start()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (args.GetBoolArg("-coinstatsindex", DEFAULT_COINSTATSINDEX)) {
|
||||
g_coin_stats_index = std::make_unique<CoinStatsIndex>(/* cache size */ 0, false, fReindex);
|
||||
g_coin_stats_index->Start();
|
||||
if (!g_coin_stats_index->Start()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// ********************************************************* Step 9: load wallet
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue