mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
validation: Prune UnloadBlockIndex and callees
In previous commits in this patchset, we've made sure that every Unload/UnloadBlockIndex member function resets its own members, and does not reach out to globals. This means that their corresponding classes' default destructors can now replace them, and do an even more thorough job without the need to be updated for every new member variable. Therefore, we can remove them, and also remove UnloadBlockIndex since that's not used anymore. Unfortunately, chainstatemanager_loadblockindex relies on CChainState::UnloadBlockIndex, so that needs to stay for now.
This commit is contained in:
@@ -134,8 +134,6 @@ extern arith_uint256 nMinimumChainWork;
|
||||
/** Documentation for argument 'checklevel'. */
|
||||
extern const std::vector<std::string> CHECKLEVEL_DOC;
|
||||
|
||||
/** Unload database information */
|
||||
void UnloadBlockIndex(ChainstateManager& chainman) EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
|
||||
/** Run instances of script checking worker threads */
|
||||
void StartScriptCheckWorkerThreads(int threads_num);
|
||||
/** Stop all of the script checking worker threads */
|
||||
@@ -988,9 +986,6 @@ public:
|
||||
//! Load the block tree and coins database from disk, initializing state if we're running with -reindex
|
||||
bool LoadBlockIndex() EXCLUSIVE_LOCKS_REQUIRED(cs_main);
|
||||
|
||||
//! Unload block index and chain data before shutdown.
|
||||
void Unload() EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
|
||||
|
||||
//! Check to see if caches are out of balance and if so, call
|
||||
//! ResizeCoinsCaches() as needed.
|
||||
void MaybeRebalanceCaches() EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
|
||||
|
||||
Reference in New Issue
Block a user