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:
Carl Dong
2021-01-12 13:38:53 -05:00
parent 7d99d725cd
commit 7ab07e0332
6 changed files with 0 additions and 54 deletions

View File

@@ -256,7 +256,5 @@ epilogue:
}
GetMainSignals().UnregisterBackgroundSignalScheduler();
WITH_LOCK(::cs_main, UnloadBlockIndex(chainman));
init::UnsetGlobals();
}