diff --git a/src/node/blockstorage.cpp b/src/node/blockstorage.cpp index 9c3475e0e7..120b86d23e 100644 --- a/src/node/blockstorage.cpp +++ b/src/node/blockstorage.cpp @@ -331,6 +331,7 @@ void BlockManager::Unload() bool BlockManager::WriteBlockIndexDB() { + AssertLockHeld(::cs_main); std::vector> vFiles; vFiles.reserve(m_dirty_fileinfo.size()); for (std::set::iterator it = m_dirty_fileinfo.begin(); it != m_dirty_fileinfo.end();) {