Merge 951850bebf into merged_master (Bitcoin PR #22371)

This commit is contained in:
James Dorfman 2023-03-16 06:04:38 +00:00
commit 44df9bbb73
7 changed files with 24 additions and 29 deletions

View file

@ -274,7 +274,6 @@ void Shutdown(NodeContext& node)
chainstate->ResetCoinsViews();
}
}
pblocktree.reset();
}
for (const auto& client : node.chain_clients) {
client->stop();
@ -1490,6 +1489,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
UnloadBlockIndex(node.mempool.get(), chainman);
auto& pblocktree{chainman.m_blockman.m_block_tree_db};
// new CBlockTreeDB tries to delete the existing file, which
// fails if it's still open from the previous loop. Close it first:
pblocktree.reset();