Merge f63fc53c2a into merged_master (Bitcoin PR bitcoin/bitcoin#21767)

This commit is contained in:
Andrew Poelstra 2021-07-20 05:10:30 +00:00
commit b654bb7f5e
16 changed files with 82 additions and 40 deletions

View file

@ -1609,21 +1609,21 @@ 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);
if (!g_txindex->Start()) {
if (!g_txindex->Start(::ChainstateActive())) {
return false;
}
}
for (const auto& filter_type : g_enabled_filter_types) {
InitBlockFilterIndex(filter_type, filter_index_cache, false, fReindex);
if (!GetBlockFilterIndex(filter_type)->Start()) {
if (!GetBlockFilterIndex(filter_type)->Start(::ChainstateActive())) {
return false;
}
}
if (args.GetBoolArg("-coinstatsindex", DEFAULT_COINSTATSINDEX)) {
g_coin_stats_index = std::make_unique<CoinStatsIndex>(/* cache size */ 0, false, fReindex);
if (!g_coin_stats_index->Start()) {
if (!g_coin_stats_index->Start(::ChainstateActive())) {
return false;
}
}