mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 20:03:34 -03:00
Add missing thread safety lock assertions in validation.h
This commit is contained in:
parent
37af8a20cf
commit
f485a07454
1 changed files with 10 additions and 4 deletions
|
@ -529,7 +529,9 @@ public:
|
|||
|
||||
//! @returns whether or not the CoinsViews object has been fully initialized and we can
|
||||
//! safely flush this object to disk.
|
||||
bool CanFlushToDisk() const EXCLUSIVE_LOCKS_REQUIRED(cs_main) {
|
||||
bool CanFlushToDisk() const EXCLUSIVE_LOCKS_REQUIRED(::cs_main)
|
||||
{
|
||||
AssertLockHeld(::cs_main);
|
||||
return m_coins_views && m_coins_views->m_cacheview;
|
||||
}
|
||||
|
||||
|
@ -557,15 +559,17 @@ public:
|
|||
std::set<CBlockIndex*, node::CBlockIndexWorkComparator> setBlockIndexCandidates;
|
||||
|
||||
//! @returns A reference to the in-memory cache of the UTXO set.
|
||||
CCoinsViewCache& CoinsTip() EXCLUSIVE_LOCKS_REQUIRED(cs_main)
|
||||
CCoinsViewCache& CoinsTip() EXCLUSIVE_LOCKS_REQUIRED(::cs_main)
|
||||
{
|
||||
AssertLockHeld(::cs_main);
|
||||
assert(m_coins_views->m_cacheview);
|
||||
return *m_coins_views->m_cacheview.get();
|
||||
}
|
||||
|
||||
//! @returns A reference to the on-disk UTXO set database.
|
||||
CCoinsViewDB& CoinsDB() EXCLUSIVE_LOCKS_REQUIRED(cs_main)
|
||||
CCoinsViewDB& CoinsDB() EXCLUSIVE_LOCKS_REQUIRED(::cs_main)
|
||||
{
|
||||
AssertLockHeld(::cs_main);
|
||||
return m_coins_views->m_dbview;
|
||||
}
|
||||
|
||||
|
@ -577,8 +581,9 @@ public:
|
|||
|
||||
//! @returns A reference to a wrapped view of the in-memory UTXO set that
|
||||
//! handles disk read errors gracefully.
|
||||
CCoinsViewErrorCatcher& CoinsErrorCatcher() EXCLUSIVE_LOCKS_REQUIRED(cs_main)
|
||||
CCoinsViewErrorCatcher& CoinsErrorCatcher() EXCLUSIVE_LOCKS_REQUIRED(::cs_main)
|
||||
{
|
||||
AssertLockHeld(::cs_main);
|
||||
return m_coins_views->m_catcherview;
|
||||
}
|
||||
|
||||
|
@ -924,6 +929,7 @@ public:
|
|||
|
||||
node::BlockMap& BlockIndex() EXCLUSIVE_LOCKS_REQUIRED(::cs_main)
|
||||
{
|
||||
AssertLockHeld(::cs_main);
|
||||
return m_blockman.m_block_index;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue