mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-13 03:30:42 +02:00
Merge bitcoin/bitcoin#26306: add lock annotation for FeeFilterRounder::round()
cbb2da8fcf
add lock annotation for FeeFilterRounder::round() (glozow) Pull request description: CI failure from #24407: https://github.com/bitcoin/bitcoin/runs/8876014446 Calling `WITH_LOCK()` on a non-recursive mutex requires not holding it beforehand. ACKs for top commit: achow101: ACKcbb2da8fcf
dergoegge: ACKcbb2da8fcf
hebasto: ACKcbb2da8fcf
, tested on Ubuntu 22.04 with clang 14.0. Tree-SHA512: d6782ee48442b9d64d58a54c1ec7c53822ab051bf9728b44d6a0e05f1953e90f16420d349379345845db203fbad4e1f5750d9070adcb7daa18f12359a29488ca
This commit is contained in:
commit
deeb70a165
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user