mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 02:25:40 +01:00
refactor: CTxMemPool::ApplyDelta() 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
66e47e5e50
commit
7140b31b90
@ -852,9 +852,9 @@ void CTxMemPool::PrioritiseTransaction(const uint256& hash, const CAmount& nFeeD
|
||||
LogPrintf("PrioritiseTransaction: %s feerate += %s\n", hash.ToString(), FormatMoney(nFeeDelta));
|
||||
}
|
||||
|
||||
void CTxMemPool::ApplyDelta(const uint256 hash, CAmount &nFeeDelta) const
|
||||
void CTxMemPool::ApplyDelta(const uint256& hash, CAmount &nFeeDelta) const
|
||||
{
|
||||
LOCK(cs);
|
||||
AssertLockHeld(cs);
|
||||
std::map<uint256, CAmount>::const_iterator pos = mapDeltas.find(hash);
|
||||
if (pos == mapDeltas.end())
|
||||
return;
|
||||
|
@ -626,7 +626,7 @@ public:
|
||||
|
||||
/** Affect CreateNewBlock prioritisation of transactions */
|
||||
void PrioritiseTransaction(const uint256& hash, const CAmount& nFeeDelta);
|
||||
void ApplyDelta(const uint256 hash, CAmount &nFeeDelta) const;
|
||||
void ApplyDelta(const uint256& hash, CAmount &nFeeDelta) const EXCLUSIVE_LOCKS_REQUIRED(cs);
|
||||
void ClearPrioritisation(const uint256 hash);
|
||||
|
||||
/** Get the transaction in the pool that spends the same prevout */
|
||||
|
Loading…
Reference in New Issue
Block a user