diff --git a/src/index/base.cpp b/src/index/base.cpp --- a/src/index/base.cpp +++ b/src/index/base.cpp @@ -66,7 +66,8 @@ return true; } -static const CBlockIndex *NextSyncBlock(const CBlockIndex *pindex_prev) { +static const CBlockIndex *NextSyncBlock(const CBlockIndex *pindex_prev) + EXCLUSIVE_LOCKS_REQUIRED(cs_main) { AssertLockHeld(cs_main); if (!pindex_prev) { diff --git a/src/validation.h b/src/validation.h --- a/src/validation.h +++ b/src/validation.h @@ -400,7 +400,7 @@ /** * Update the chain tip based on database information. */ -bool LoadChainTip(const Config &config); +bool LoadChainTip(const Config &config) EXCLUSIVE_LOCKS_REQUIRED(cs_main); /** * Unload database information. @@ -638,7 +638,8 @@ /** Find the last common block between the parameter chain and a locator. */ CBlockIndex *FindForkInGlobalIndex(const CChain &chain, - const CBlockLocator &locator); + const CBlockLocator &locator) + EXCLUSIVE_LOCKS_REQUIRED(cs_main); /** * Mark a block as precious and reorganize.