mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
validation, refactoring: remove ChainstateManager::Reset()
Co-authored-by: Vasil Dimov <vd@FreeBSD.org> Co-authored-by: laanwj <126646+laanwj@users.noreply.github.com>
This commit is contained in:
@@ -985,17 +985,13 @@ public:
|
||||
//! Unload block index and chain data before shutdown.
|
||||
void Unload() EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
|
||||
|
||||
//! Clear (deconstruct) chainstate data.
|
||||
void Reset();
|
||||
|
||||
//! Check to see if caches are out of balance and if so, call
|
||||
//! ResizeCoinsCaches() as needed.
|
||||
void MaybeRebalanceCaches() EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
|
||||
|
||||
~ChainstateManager() {
|
||||
LOCK(::cs_main);
|
||||
UnloadBlockIndex(/* mempool */ nullptr, *this);
|
||||
Reset();
|
||||
UnloadBlockIndex(/*mempool=*/nullptr, *this);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user