diff --git a/src/txmempool.h b/src/txmempool.h --- a/src/txmempool.h +++ b/src/txmempool.h @@ -30,6 +30,8 @@ class CBlockIndex; class Config; +extern CCriticalSection cs_main; + inline double AllowFreeThreshold() { return (144 * COIN) / (250 * SATOSHI); } @@ -595,7 +597,8 @@ const CTransaction &tx, MemPoolRemovalReason reason = MemPoolRemovalReason::UNKNOWN); void removeForReorg(const Config &config, const CCoinsViewCache *pcoins, - unsigned int nMemPoolHeight, int flags); + unsigned int nMemPoolHeight, int flags) + EXCLUSIVE_LOCKS_REQUIRED(cs_main); void removeConflicts(const CTransaction &tx); void removeForBlock(const std::vector &vtx, unsigned int nBlockHeight); diff --git a/src/txmempool.cpp b/src/txmempool.cpp --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -556,8 +556,7 @@ void CTxMemPool::removeForReorg(const Config &config, const CCoinsViewCache *pcoins, - unsigned int nMemPoolHeight, int flags) - EXCLUSIVE_LOCKS_REQUIRED(cs_main) { + unsigned int nMemPoolHeight, int flags) { // Remove transactions spending a coinbase which are now immature and // no-longer-final transactions. LOCK(cs); diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -4665,8 +4665,7 @@ } bool CWalletTx::AcceptToMemoryPool(const Amount nAbsurdFee, - CValidationState &state) - EXCLUSIVE_LOCKS_REQUIRED(cs_main) { + CValidationState &state) { // Quick check to avoid re-setting fInMempool to false if (g_mempool.exists(tx->GetId())) { return false;