mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-04 18:22:57 +02:00
Merge #19927: validation: Reduce direct g_chainman usage
72a1d5c6f3validation: Remove review-only comments + assertions (Carl Dong)3756853b15docs: Move FindFilesToPrune{,Manual} doxygen comment (Carl Dong)485899a93cstyle: Make FindFilesToPrune{,Manual} match style guide (Carl Dong)3f5b5f3f6dvalidation: Move FindFilesToPrune{,Manual} to BlockManager (Carl Dong)f8d4975ab3validation: Move PruneOneBlockFile to BlockManager (Carl Dong)74f73c783dvalidation: Pass in chainman to UnloadBlockIndex (Carl Dong)4668ded6d6validation: Move ~CMainCleanup logic to ~BlockManager (Carl Dong) Pull request description: This PR paves the way for de-globalizing `g_chainman` entirely by removing the usage of `g_chainman` in the following functions/methods: - `~CMainCleanup` - `CChainState::FlushStateToDisk` - `UnloadBlockIndex` The remaining direct uses of `g_chainman` are as follows: 1. In initialization codepaths: - `AppTests` - `AppInitMain` - `TestingSetup::TestingSetup` 2. `::ChainstateActive` 3. `LookupBlockIndex` - Note: `LookupBlockIndex` is used extensively throughout the codebase and require a much larger set of changes, therefore I've left it out of this initial PR ACKs for top commit: MarcoFalke: re-ACK72a1d5c6f3👚 jnewbery: utACK72a1d5c6f3Tree-SHA512: 944a4fa8405eecf39706ff944375d6824373aaeea849d11473f08181eff26b12f70043a8348a5b08e6e9021b243b481842fbdfbc7c3140ca795fce3688b7f5c3
This commit is contained in:
@@ -187,7 +187,7 @@ TestingSetup::~TestingSetup()
|
||||
m_node.connman.reset();
|
||||
m_node.banman.reset();
|
||||
m_node.args = nullptr;
|
||||
UnloadBlockIndex(m_node.mempool.get());
|
||||
UnloadBlockIndex(m_node.mempool.get(), *m_node.chainman);
|
||||
m_node.mempool.reset();
|
||||
m_node.scheduler.reset();
|
||||
m_node.chainman->Reset();
|
||||
|
||||
Reference in New Issue
Block a user