diff --git a/src/txmempool.cpp b/src/txmempool.cpp index 00b1fb38f81..f60809e1968 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -862,9 +862,9 @@ void CTxMemPool::ApplyDelta(const uint256& hash, CAmount &nFeeDelta) const nFeeDelta += delta; } -void CTxMemPool::ClearPrioritisation(const uint256 hash) +void CTxMemPool::ClearPrioritisation(const uint256& hash) { - LOCK(cs); + AssertLockHeld(cs); mapDeltas.erase(hash); } diff --git a/src/txmempool.h b/src/txmempool.h index 46bcf85712f..ddd87d2eb35 100644 --- a/src/txmempool.h +++ b/src/txmempool.h @@ -627,7 +627,7 @@ public: /** Affect CreateNewBlock prioritisation of transactions */ void PrioritiseTransaction(const uint256& hash, const CAmount& nFeeDelta); 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 */ const CTransaction* GetConflictTx(const COutPoint& prevout) const EXCLUSIVE_LOCKS_REQUIRED(cs);