mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-02 09:46:52 -05:00
Merge bitcoin/bitcoin#24002: refactor: add thread safety lock assertion to WriteBlockIndexDB()
1823766fc6
refactor: add thread safety lock assertion to WriteBlockIndexDB() (Jon Atack) Pull request description: New helper function `BlockManager::WriteBlockIndexDB()` added in #23974 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." ACKs for top commit: MarcoFalke: cr ACK1823766fc6
Tree-SHA512: b915e6b105c38b8bbe04ad810aefa68e940a13b8dd265e79563a2aaefc93ffa031d56a7f3c481a5ada90de7c2ddd3b419dcfa46c22fa26c22f95eda15cd243bc
This commit is contained in:
commit
6182e5086f
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