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

No change in behavior, the lock is already held at call sites.
pull/764/head
Hennadii Stepanov 4 years ago
parent 7c4bd0387a
commit 020f0519ec
No known key found for this signature in database
GPG Key ID: 410108112E7EA81F

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

Loading…
Cancel
Save