mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 02:25:40 +01:00
refactor: CTxMemPool::UpdateParent() requires CTxMemPool::cs lock
No change in behavior, the lock is already held at call sites.
This commit is contained in:
parent
bab4cce1b0
commit
939807768a
@ -978,6 +978,7 @@ void CTxMemPool::UpdateChild(txiter entry, txiter child, bool add)
|
||||
|
||||
void CTxMemPool::UpdateParent(txiter entry, txiter parent, bool add)
|
||||
{
|
||||
AssertLockHeld(cs);
|
||||
setEntries s;
|
||||
if (add && mapLinks[entry].parents.insert(parent).second) {
|
||||
cachedInnerUsage += memusage::IncrementalDynamicUsage(s);
|
||||
|
@ -568,7 +568,7 @@ private:
|
||||
typedef std::map<txiter, TxLinks, CompareIteratorByHash> txlinksMap;
|
||||
txlinksMap mapLinks;
|
||||
|
||||
void UpdateParent(txiter entry, txiter parent, bool add);
|
||||
void UpdateParent(txiter entry, txiter parent, bool add) EXCLUSIVE_LOCKS_REQUIRED(cs);
|
||||
void UpdateChild(txiter entry, txiter child, bool add);
|
||||
|
||||
std::vector<indexed_transaction_set::const_iterator> GetSortedDepthAndScore() const EXCLUSIVE_LOCKS_REQUIRED(cs);
|
||||
|
Loading…
Reference in New Issue
Block a user