aboutsummaryrefslogtreecommitdiff
path: root/src/txmempool.h
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2020-09-01 12:36:27 +0300
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2020-09-01 12:36:27 +0300
commit020f0519ec66d9626255b938e1c6c3f7f9aa4017 (patch)
tree526809e4b08a5701403f930f9df64ee16eca33fb /src/txmempool.h
parent7c4bd0387a01a0c3e2938d530dba3c882e4d8f2b (diff)
refactor: CTxMemPool::IsUnbroadcastTx() requires CTxMemPool::cs lock
No change in behavior, the lock is already held at call sites.
Diffstat (limited to 'src/txmempool.h')
-rw-r--r--src/txmempool.h7
1 files changed, 4 insertions, 3 deletions
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: