validation: replace lock with annotation in UnloadBlockIndex()

This commit is contained in:
Jon Atack
2022-02-09 14:01:32 +01:00
parent 6ac637f97f
commit daad0093e3
3 changed files with 3 additions and 3 deletions

View File

@@ -4028,7 +4028,7 @@ void CChainState::UnloadBlockIndex() {
// block index state
void UnloadBlockIndex(CTxMemPool* mempool, ChainstateManager& chainman)
{
LOCK(cs_main);
AssertLockHeld(::cs_main);
chainman.Unload();
pindexBestHeader = nullptr;
if (mempool) mempool->clear();