Skip to content

Commit e5e3745

Browse files
committed
merge bitcoin#24002: add thread safety lock assertion to WriteBlockIndexDB()
1 parent 04a3f65 commit e5e3745

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/node/blockstorage.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ void BlockManager::Unload()
331331

332332
bool BlockManager::WriteBlockIndexDB()
333333
{
334+
AssertLockHeld(::cs_main);
334335
std::vector<std::pair<int, const CBlockFileInfo*>> vFiles;
335336
vFiles.reserve(m_dirty_fileinfo.size());
336337
for (std::set<int>::iterator it = m_dirty_fileinfo.begin(); it != m_dirty_fileinfo.end();) {

0 commit comments

Comments
 (0)