From daad0093e3d1466789d0ce687902636c80cd74a1 Mon Sep 17 00:00:00 2001 From: Jon Atack Date: Wed, 9 Feb 2022 14:01:32 +0100 Subject: validation: replace lock with annotation in UnloadBlockIndex() --- src/test/util/setup_common.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/test/util/setup_common.cpp') diff --git a/src/test/util/setup_common.cpp b/src/test/util/setup_common.cpp index c968e4d124..bb3c88f627 100644 --- a/src/test/util/setup_common.cpp +++ b/src/test/util/setup_common.cpp @@ -180,7 +180,7 @@ ChainTestingSetup::~ChainTestingSetup() m_node.banman.reset(); m_node.addrman.reset(); m_node.args = nullptr; - UnloadBlockIndex(m_node.mempool.get(), *m_node.chainman); + WITH_LOCK(::cs_main, UnloadBlockIndex(m_node.mempool.get(), *m_node.chainman)); m_node.mempool.reset(); m_node.scheduler.reset(); m_node.chainman->Reset(); -- cgit v1.2.3