mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-08 10:31:50 -05:00
refactor: add thread safety lock assertion to WriteBlockIndexDB()
The new helper function, BlockManager::WriteBlockIndexDB(), has a thread safety lock annotation in its declaration but is missing the corresponding run-time lock assertion in its definition. Per doc/developer-notes.md: "Combine annotations in function declarations with run-time asserts in function definitions."
This commit is contained in:
parent
4ada74206a
commit
1823766fc6
1 changed files with 1 additions and 0 deletions
|
@ -340,6 +340,7 @@ void BlockManager::Unload()
|
|||
|
||||
bool BlockManager::WriteBlockIndexDB()
|
||||
{
|
||||
AssertLockHeld(::cs_main);
|
||||
std::vector<std::pair<int, const CBlockFileInfo*>> vFiles;
|
||||
vFiles.reserve(m_dirty_fileinfo.size());
|
||||
for (std::set<int>::iterator it = m_dirty_fileinfo.begin(); it != m_dirty_fileinfo.end();) {
|
||||
|
|
Loading…
Add table
Reference in a new issue