aboutsummaryrefslogtreecommitdiff
path: root/src/txmempool.cpp
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2020-09-01 12:22:21 +0300
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2020-09-01 12:34:29 +0300
commit7140b31b90cbd84d75eedb3e395d0d55f83b5b95 (patch)
tree1407b7a46bbf4b96dcbefa34533971bac7df322b /src/txmempool.cpp
parent66e47e5e506043fbb9b4e487b44bf992985709c9 (diff)
downloadbitcoin-7140b31b90cbd84d75eedb3e395d0d55f83b5b95.tar.xz
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&`.
Diffstat (limited to 'src/txmempool.cpp')
-rw-r--r--src/txmempool.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index ea6d7e808c..00b1fb38f8 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -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;