diff --git a/src/avalanche/processor.cpp b/src/avalanche/processor.cpp
--- a/src/avalanche/processor.cpp
+++ b/src/avalanche/processor.cpp
@@ -31,7 +31,8 @@
 std::unique_ptr<avalanche::Processor> g_avalanche;
 
 namespace avalanche {
-static bool IsWorthPolling(const CBlockIndex *pindex) {
+static bool IsWorthPolling(const CBlockIndex *pindex)
+    EXCLUSIVE_LOCKS_REQUIRED(cs_main) {
     AssertLockHeld(cs_main);
 
     if (pindex->nStatus.isInvalid()) {
diff --git a/src/sync.h b/src/sync.h
--- a/src/sync.h
+++ b/src/sync.h
@@ -56,7 +56,7 @@
 std::string LocksHeld();
 template <typename MutexType>
 void AssertLockHeldInternal(const char *pszName, const char *pszFile, int nLine,
-                            MutexType *cs) ASSERT_EXCLUSIVE_LOCK(cs);
+                            MutexType *cs);
 void AssertLockNotHeldInternal(const char *pszName, const char *pszFile,
                                int nLine, void *cs);
 void DeleteLock(void *cs);
@@ -77,8 +77,7 @@
                               int line) {}
 template <typename MutexType>
 inline void AssertLockHeldInternal(const char *pszName, const char *pszFile,
-                                   int nLine, MutexType *cs)
-    ASSERT_EXCLUSIVE_LOCK(cs) {}
+                                   int nLine, MutexType *cs) {}
 inline void AssertLockNotHeldInternal(const char *pszName, const char *pszFile,
                                       int nLine, void *cs) {}
 inline void DeleteLock(void *cs) {}