diff options
author | Carl Dong <contact@carldong.me> | 2021-01-12 13:38:53 -0500 |
---|---|---|
committer | Carl Dong <contact@carldong.me> | 2022-04-27 11:13:38 -0400 |
commit | 7ab07e033237d6ea179a6a2c76575ed6bd01a670 (patch) | |
tree | dd76d0815b961ca6c166c48de8261d20ef6c3f92 /src/bitcoin-chainstate.cpp | |
parent | 7d99d725cdb5428ed25dc07c2d7fddf420da7786 (diff) | |
download | bitcoin-7ab07e033237d6ea179a6a2c76575ed6bd01a670.tar.xz |
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/bitcoin-chainstate.cpp')
-rw-r--r-- | src/bitcoin-chainstate.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/bitcoin-chainstate.cpp b/src/bitcoin-chainstate.cpp index 973b866ec8..1e4200db02 100644 --- a/src/bitcoin-chainstate.cpp +++ b/src/bitcoin-chainstate.cpp @@ -256,7 +256,5 @@ epilogue: } GetMainSignals().UnregisterBackgroundSignalScheduler(); - WITH_LOCK(::cs_main, UnloadBlockIndex(chainman)); - init::UnsetGlobals(); } |