diff options
| author | Hennadii Stepanov <[email protected]> | 2020-09-01 12:36:27 +0300 |
|---|---|---|
| committer | Hennadii Stepanov <[email protected]> | 2020-09-01 12:36:27 +0300 |
| commit | 020f0519ec66d9626255b938e1c6c3f7f9aa4017 (patch) | |
| tree | 526809e4b08a5701403f930f9df64ee16eca33fb /src | |
| parent | refactor: CTxMemPool::GetTotalTxSize() requires CTxMemPool::cs lock (diff) | |
| download | discoin-020f0519ec66d9626255b938e1c6c3f7f9aa4017.tar.xz discoin-020f0519ec66d9626255b938e1c6c3f7f9aa4017.zip | |
refactor: CTxMemPool::IsUnbroadcastTx() requires CTxMemPool::cs lock
No change in behavior, the lock is already held at call sites.
Diffstat (limited to 'src')
| -rw-r--r-- | src/txmempool.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/txmempool.h b/src/txmempool.h index 6e286faf8..f773cd482 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: |