aboutsummaryrefslogtreecommitdiff
path: root/src/test/util
diff options
context:
space:
mode:
authorCarl Dong <contact@carldong.me>2021-01-12 13:38:53 -0500
committerCarl Dong <contact@carldong.me>2022-04-27 11:13:38 -0400
commit7ab07e033237d6ea179a6a2c76575ed6bd01a670 (patch)
treedd76d0815b961ca6c166c48de8261d20ef6c3f92 /src/test/util
parent7d99d725cdb5428ed25dc07c2d7fddf420da7786 (diff)
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.
Diffstat (limited to 'src/test/util')
-rw-r--r--src/test/util/setup_common.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/test/util/setup_common.cpp b/src/test/util/setup_common.cpp
index 3959bf7ae7..2fc71c2a6e 100644
--- a/src/test/util/setup_common.cpp
+++ b/src/test/util/setup_common.cpp
@@ -182,7 +182,6 @@ ChainTestingSetup::~ChainTestingSetup()
m_node.addrman.reset();
m_node.netgroupman.reset();
m_node.args = nullptr;
- WITH_LOCK(::cs_main, UnloadBlockIndex(*m_node.chainman));
m_node.mempool.reset();
m_node.scheduler.reset();
m_node.chainman.reset();