mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 20:03:34 -03: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
2 changed files with 2 additions and 1 deletions
|
@ -978,6 +978,7 @@ void CTxMemPool::UpdateChild(txiter entry, txiter child, bool add)
|
||||||
|
|
||||||
void CTxMemPool::UpdateParent(txiter entry, txiter parent, bool add)
|
void CTxMemPool::UpdateParent(txiter entry, txiter parent, bool add)
|
||||||
{
|
{
|
||||||
|
AssertLockHeld(cs);
|
||||||
setEntries s;
|
setEntries s;
|
||||||
if (add && mapLinks[entry].parents.insert(parent).second) {
|
if (add && mapLinks[entry].parents.insert(parent).second) {
|
||||||
cachedInnerUsage += memusage::IncrementalDynamicUsage(s);
|
cachedInnerUsage += memusage::IncrementalDynamicUsage(s);
|
||||||
|
|
|
@ -568,7 +568,7 @@ private:
|
||||||
typedef std::map<txiter, TxLinks, CompareIteratorByHash> txlinksMap;
|
typedef std::map<txiter, TxLinks, CompareIteratorByHash> txlinksMap;
|
||||||
txlinksMap mapLinks;
|
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);
|
void UpdateChild(txiter entry, txiter child, bool add);
|
||||||
|
|
||||||
std::vector<indexed_transaction_set::const_iterator> GetSortedDepthAndScore() const EXCLUSIVE_LOCKS_REQUIRED(cs);
|
std::vector<indexed_transaction_set::const_iterator> GetSortedDepthAndScore() const EXCLUSIVE_LOCKS_REQUIRED(cs);
|
||||||
|
|
Loading…
Reference in a new issue