mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-05 14:06:27 -05:00
refactor: CTxMemPool::ClearPrioritisation() requires CTxMemPool::cs lock
No change in behavior, the lock is already held at call sites. Also `const uint256` refactored to `const uint256&`.
This commit is contained in:
parent
7140b31b90
commit
fa5fcb032b
2 changed files with 3 additions and 3 deletions
|
@ -862,9 +862,9 @@ void CTxMemPool::ApplyDelta(const uint256& hash, CAmount &nFeeDelta) const
|
||||||
nFeeDelta += delta;
|
nFeeDelta += delta;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CTxMemPool::ClearPrioritisation(const uint256 hash)
|
void CTxMemPool::ClearPrioritisation(const uint256& hash)
|
||||||
{
|
{
|
||||||
LOCK(cs);
|
AssertLockHeld(cs);
|
||||||
mapDeltas.erase(hash);
|
mapDeltas.erase(hash);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -627,7 +627,7 @@ public:
|
||||||
/** Affect CreateNewBlock prioritisation of transactions */
|
/** Affect CreateNewBlock prioritisation of transactions */
|
||||||
void PrioritiseTransaction(const uint256& hash, const CAmount& nFeeDelta);
|
void PrioritiseTransaction(const uint256& hash, const CAmount& nFeeDelta);
|
||||||
void ApplyDelta(const uint256& hash, CAmount &nFeeDelta) const EXCLUSIVE_LOCKS_REQUIRED(cs);
|
void ApplyDelta(const uint256& hash, CAmount &nFeeDelta) const EXCLUSIVE_LOCKS_REQUIRED(cs);
|
||||||
void ClearPrioritisation(const uint256 hash);
|
void ClearPrioritisation(const uint256& hash) EXCLUSIVE_LOCKS_REQUIRED(cs);
|
||||||
|
|
||||||
/** Get the transaction in the pool that spends the same prevout */
|
/** Get the transaction in the pool that spends the same prevout */
|
||||||
const CTransaction* GetConflictTx(const COutPoint& prevout) const EXCLUSIVE_LOCKS_REQUIRED(cs);
|
const CTransaction* GetConflictTx(const COutPoint& prevout) const EXCLUSIVE_LOCKS_REQUIRED(cs);
|
||||||
|
|
Loading…
Add table
Reference in a new issue