mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-05 18:52:29 +02:00
add lock annotation for FeeFilterRounder::round()
Calling WITH_LOCK() on a non-recursive mutex requires not holding it beforehand. Co-authored-by: Niklas Gögge <n.goeggi@gmail.com>
This commit is contained in:
@@ -1036,6 +1036,7 @@ FeeFilterRounder::FeeFilterRounder(const CFeeRate& minIncrementalFee)
|
|||||||
|
|
||||||
CAmount FeeFilterRounder::round(CAmount currentMinFee)
|
CAmount FeeFilterRounder::round(CAmount currentMinFee)
|
||||||
{
|
{
|
||||||
|
AssertLockNotHeld(m_insecure_rand_mutex);
|
||||||
std::set<double>::iterator it = m_fee_set.lower_bound(currentMinFee);
|
std::set<double>::iterator it = m_fee_set.lower_bound(currentMinFee);
|
||||||
if (it == m_fee_set.end() ||
|
if (it == m_fee_set.end() ||
|
||||||
(it != m_fee_set.begin() &&
|
(it != m_fee_set.begin() &&
|
||||||
|
|||||||
@@ -302,7 +302,7 @@ public:
|
|||||||
explicit FeeFilterRounder(const CFeeRate& min_incremental_fee);
|
explicit FeeFilterRounder(const CFeeRate& min_incremental_fee);
|
||||||
|
|
||||||
/** Quantize a minimum fee for privacy purpose before broadcast. */
|
/** Quantize a minimum fee for privacy purpose before broadcast. */
|
||||||
CAmount round(CAmount currentMinFee);
|
CAmount round(CAmount currentMinFee) EXCLUSIVE_LOCKS_REQUIRED(!m_insecure_rand_mutex);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const std::set<double> m_fee_set;
|
const std::set<double> m_fee_set;
|
||||||
|
|||||||
Reference in New Issue
Block a user