mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
Merge #19604: Pass mempool pointer to UnloadBlockIndex/GetCoinsCacheSizeState
fae8c28daePass mempool pointer to GetCoinsCacheSizeState (MarcoFalke)fac674db20Pass mempool pointer to UnloadBlockIndex (MarcoFalke)faec851b6etest: Simplify cs_main locks (MarcoFalke) Pull request description: Split out from #19556 Instead of relying on the implicit mempool global, pass a mempool pointer (which can be `0`). This helps with testing, code clarity and unlocks the features described in #19556. ACKs for top commit: jnewbery: code review ACKfae8c28daefjahr: Code review ACKfae8c28daedarosior: Tested ACKfae8c28daejamesob: ACKfae8c28dae([`jamesob/ackr/19604.1.MarcoFalke.pass_mempool_pointer_to`](https://github.com/jamesob/bitcoin/tree/ackr/19604.1.MarcoFalke.pass_mempool_pointer_to)) Tree-SHA512: fa687518c8cda4a095bdbdfe56e01fae2fb16c13d51efbb1312cd6dc007611fc47f53f475602e4a843e3973c9410e6af5a81d6847bd2399f8262ca7205975728
This commit is contained in:
@@ -1567,7 +1567,7 @@ bool AppInitMain(const util::Ref& context, NodeContext& node)
|
||||
chainman.m_total_coinstip_cache = nCoinCacheUsage;
|
||||
chainman.m_total_coinsdb_cache = nCoinDBCache;
|
||||
|
||||
UnloadBlockIndex();
|
||||
UnloadBlockIndex(node.mempool);
|
||||
|
||||
// new CBlockTreeDB tries to delete the existing file, which
|
||||
// fails if it's still open from the previous loop. Close it first:
|
||||
|
||||
Reference in New Issue
Block a user