mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
Merge #18819: net: Replace cs_feeFilter with simple std::atomic
fad1f0fd33net: Remove unused cs_feeFilter (MarcoFalke) Pull request description: A `RecursiveMutex` is overkill for setting or reading a plain integer. Even a `Mutex` is overkill, when a plain `std::atomic` can be used. This removes 11 lines of code. Also, it is cutting down on the number of locks put on the stack at the same time, which complicates review looking out for potential lock contention. ACKs for top commit: jnewbery: utACKfad1f0fd33practicalswift: cr ACKfad1f0fd33: patch looks correct Tree-SHA512: 647f9b954fbf52e138d3e710937eb9131b390fef0deae03fd6a162d5a18b9f194010800bbddc8f89208d91be2802dff11c3884d04b3dd233865abd12aa3cde06
This commit is contained in:
@@ -592,7 +592,6 @@ void CNode::copyStats(CNodeStats &stats, const std::vector<bool> &m_asmap)
|
||||
}
|
||||
X(m_permissionFlags);
|
||||
if (m_tx_relay != nullptr) {
|
||||
LOCK(m_tx_relay->cs_feeFilter);
|
||||
stats.minFeeFilter = m_tx_relay->minFeeFilter;
|
||||
} else {
|
||||
stats.minFeeFilter = 0;
|
||||
|
||||
Reference in New Issue
Block a user