mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
Move pblocktree global to BlockManager
This commit is contained in:
@@ -264,7 +264,6 @@ void Shutdown(NodeContext& node)
|
||||
chainstate->ResetCoinsViews();
|
||||
}
|
||||
}
|
||||
pblocktree.reset();
|
||||
}
|
||||
for (const auto& client : node.chain_clients) {
|
||||
client->stop();
|
||||
@@ -1355,6 +1354,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();
|
||||
|
||||
Reference in New Issue
Block a user