mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-13 01:07:00 +02:00
thread-safety: add missing lock annotation
No warning is currently emitted because our reverse_lock does not enforce our thread-safety annotations. Once it is fixed, the unlock would cause a warning.
This commit is contained in:
@ -431,7 +431,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
// NOLINTNEXTLINE(misc-no-recursion)
|
// NOLINTNEXTLINE(misc-no-recursion)
|
||||||
bool FillBlock(const CBlockIndex* index, const FoundBlock& block, UniqueLock<RecursiveMutex>& lock, const CChain& active, const BlockManager& blockman)
|
bool FillBlock(const CBlockIndex* index, const FoundBlock& block, UniqueLock<RecursiveMutex>& lock, const CChain& active, const BlockManager& blockman) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
|
||||||
{
|
{
|
||||||
if (!index) return false;
|
if (!index) return false;
|
||||||
if (block.m_hash) *block.m_hash = index->GetBlockHash();
|
if (block.m_hash) *block.m_hash = index->GetBlockHash();
|
||||||
|
Reference in New Issue
Block a user