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:
Jon Atack
2022-02-08 20:56:14 +01:00
parent daad0093e3
commit ae9ceed3e2
3 changed files with 1 additions and 15 deletions

View File

@@ -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);
}
};