diff --git a/doc/developer-notes.md b/doc/developer-notes.md --- a/doc/developer-notes.md +++ b/doc/developer-notes.md @@ -769,7 +769,7 @@ class ChainstateManager { public: ... - bool ProcessNewBlock(...) EXCLUSIVE_LOCKS_REQUIRED(!::cs_main); + bool ProcessNewBlock(...) LOCKS_EXCLUDED(::cs_main); ... } diff --git a/src/index/base.h b/src/index/base.h --- a/src/index/base.h +++ b/src/index/base.h @@ -113,7 +113,7 @@ /// sync once and only needs to process blocks in the ValidationInterface /// queue. If the index is catching up from far behind, this method does /// not block and immediately returns false. - bool BlockUntilSyncedToCurrentChain() const; + bool BlockUntilSyncedToCurrentChain() const LOCKS_EXCLUDED(::cs_main); void Interrupt(); diff --git a/src/sync.h b/src/sync.h --- a/src/sync.h +++ b/src/sync.h @@ -59,8 +59,7 @@ MutexType *cs) EXCLUSIVE_LOCKS_REQUIRED(cs); template void AssertLockNotHeldInternal(const char *pszName, const char *pszFile, - int nLine, MutexType *cs) - EXCLUSIVE_LOCKS_REQUIRED(!cs); + int nLine, MutexType *cs) LOCKS_EXCLUDED(cs); void DeleteLock(void *cs); bool LockStackEmpty(); @@ -83,8 +82,7 @@ EXCLUSIVE_LOCKS_REQUIRED(cs) {} template void AssertLockNotHeldInternal(const char *pszName, const char *pszFile, - int nLine, MutexType *cs) - EXCLUSIVE_LOCKS_REQUIRED(!cs) {} + int nLine, MutexType *cs) LOCKS_EXCLUDED(cs) {} inline void DeleteLock(void *cs) {} inline bool LockStackEmpty() { return true; diff --git a/src/validation.h b/src/validation.h --- a/src/validation.h +++ b/src/validation.h @@ -929,20 +929,20 @@ CBlockIndex *pindex) LOCKS_EXCLUDED(cs_main); /** Mark a block as invalid. */ bool InvalidateBlock(const Config &config, BlockValidationState &state, - CBlockIndex *pindex) - EXCLUSIVE_LOCKS_REQUIRED(!cs_main, !m_cs_chainstate); + CBlockIndex *pindex) LOCKS_EXCLUDED(cs_main) + EXCLUSIVE_LOCKS_REQUIRED(!m_cs_chainstate); /** Park a block. */ bool ParkBlock(const Config &config, BlockValidationState &state, - CBlockIndex *pindex) - EXCLUSIVE_LOCKS_REQUIRED(!cs_main, !m_cs_chainstate); + CBlockIndex *pindex) LOCKS_EXCLUDED(cs_main) + EXCLUSIVE_LOCKS_REQUIRED(!m_cs_chainstate); /** * Finalize a block. * A finalized block can not be reorged in any way. */ bool FinalizeBlock(const Config &config, BlockValidationState &state, - CBlockIndex *pindex) - EXCLUSIVE_LOCKS_REQUIRED(!cs_main, !m_cs_chainstate); + CBlockIndex *pindex) LOCKS_EXCLUDED(cs_main) + EXCLUSIVE_LOCKS_REQUIRED(!m_cs_chainstate); /** Return the currently finalized block index. */ const CBlockIndex *GetFinalizedBlock() const EXCLUSIVE_LOCKS_REQUIRED(cs_main); diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -1424,8 +1424,8 @@ * Obviously holding cs_main/cs_wallet when going into this call may cause * deadlock */ - void BlockUntilSyncedToCurrentChain() const - EXCLUSIVE_LOCKS_REQUIRED(!::cs_main, !cs_wallet); + void BlockUntilSyncedToCurrentChain() const LOCKS_EXCLUDED(::cs_main) + EXCLUSIVE_LOCKS_REQUIRED(!cs_wallet); /** * Set a single wallet flag.