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:
Cory Fields
2025-05-08 13:30:12 +00:00
parent 832c57a534
commit aeea5f0ec1

View File

@ -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();