mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 10:43:19 -03: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:
parent
0384b19414
commit
cbb2da8fcf
2 changed files with 2 additions and 1 deletions
|
@ -1036,6 +1036,7 @@ FeeFilterRounder::FeeFilterRounder(const CFeeRate& minIncrementalFee)
|
|||
|
||||
CAmount FeeFilterRounder::round(CAmount currentMinFee)
|
||||
{
|
||||
AssertLockNotHeld(m_insecure_rand_mutex);
|
||||
std::set<double>::iterator it = m_fee_set.lower_bound(currentMinFee);
|
||||
if (it == m_fee_set.end() ||
|
||||
(it != m_fee_set.begin() &&
|
||||
|
|
|
@ -302,7 +302,7 @@ public:
|
|||
explicit FeeFilterRounder(const CFeeRate& min_incremental_fee);
|
||||
|
||||
/** 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:
|
||||
const std::set<double> m_fee_set;
|
||||
|
|
Loading…
Add table
Reference in a new issue