From 020f0519ec66d9626255b938e1c6c3f7f9aa4017 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Tue, 1 Sep 2020 12:36:27 +0300 Subject: refactor: CTxMemPool::IsUnbroadcastTx() requires CTxMemPool::cs lock No change in behavior, the lock is already held at call sites. --- src/txmempool.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/txmempool.h b/src/txmempool.h index 6e286faf80..f773cd4825 100644 --- a/src/txmempool.h +++ b/src/txmempool.h @@ -757,9 +757,10 @@ public: } /** Returns whether a txid is in the unbroadcast set */ - bool IsUnbroadcastTx(const uint256& txid) const { - LOCK(cs); - return (m_unbroadcast_txids.count(txid) != 0); + bool IsUnbroadcastTx(const uint256& txid) const EXCLUSIVE_LOCKS_REQUIRED(cs) + { + AssertLockHeld(cs); + return m_unbroadcast_txids.count(txid) != 0; } private: -- cgit v1.2.3