Skip to content

Commit 020f051

Browse files
committed
refactor: CTxMemPool::IsUnbroadcastTx() requires CTxMemPool::cs lock
No change in behavior, the lock is already held at call sites.
1 parent 7c4bd03 commit 020f051

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/txmempool.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -757,9 +757,10 @@ class CTxMemPool
757757
}
758758

759759
/** Returns whether a txid is in the unbroadcast set */
760-
bool IsUnbroadcastTx(const uint256& txid) const {
761-
LOCK(cs);
762-
return (m_unbroadcast_txids.count(txid) != 0);
760+
bool IsUnbroadcastTx(const uint256& txid) const EXCLUSIVE_LOCKS_REQUIRED(cs)
761+
{
762+
AssertLockHeld(cs);
763+
return m_unbroadcast_txids.count(txid) != 0;
763764
}
764765

765766
private:

0 commit comments

Comments
 (0)