From 4668ded6d6ea4299d998abbb57543f37519812e2 Mon Sep 17 00:00:00 2001 From: Carl Dong Date: Tue, 8 Sep 2020 14:36:31 -0400 Subject: validation: Move ~CMainCleanup logic to ~BlockManager ~CMainCleanup: 1. Is vestigial 2. References the g_chainman global (we should minimize g_chainman refs) 3. Only acts on g_chainman.m_blockman 4. Does the same thing as BlockManager::Unload --- src/validation.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/validation.h') diff --git a/src/validation.h b/src/validation.h index 53c2dd65e5..12d1d4c91f 100644 --- a/src/validation.h +++ b/src/validation.h @@ -416,6 +416,10 @@ public: BlockValidationState& state, const CChainParams& chainparams, CBlockIndex** ppindex) EXCLUSIVE_LOCKS_REQUIRED(cs_main); + + ~BlockManager() { + Unload(); + } }; /** -- cgit v1.2.3