0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-03 09:56:38 -05:00

refactor: CTxMemPool::UpdateChild() 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:18:20 +03:00
parent 939807768a
commit 66e47e5e50
No known key found for this signature in database
GPG key ID: 410108112E7EA81F
2 changed files with 2 additions and 1 deletions

View file

@ -968,6 +968,7 @@ void CTxMemPool::addUnchecked(const CTxMemPoolEntry &entry, bool validFeeEstimat
void CTxMemPool::UpdateChild(txiter entry, txiter child, bool add)
{
AssertLockHeld(cs);
setEntries s;
if (add && mapLinks[entry].children.insert(child).second) {
cachedInnerUsage += memusage::IncrementalDynamicUsage(s);

View file

@ -569,7 +569,7 @@ private:
txlinksMap mapLinks;
void UpdateParent(txiter entry, txiter parent, bool add) EXCLUSIVE_LOCKS_REQUIRED(cs);
void UpdateChild(txiter entry, txiter child, bool add);
void UpdateChild(txiter entry, txiter child, bool add) EXCLUSIVE_LOCKS_REQUIRED(cs);
std::vector<indexed_transaction_set::const_iterator> GetSortedDepthAndScore() const EXCLUSIVE_LOCKS_REQUIRED(cs);