refactor: CTxMemPool::IsUnbroadcastTx() requires CTxMemPool::cs lock

No change in behavior, the lock is already held at call sites.
This commit is contained in:
Hennadii Stepanov 2020-09-01 12:36:27 +03:00
parent 7c4bd0387a
commit 020f0519ec
No known key found for this signature in database
GPG Key ID: 410108112E7EA81F

View File

@ -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: