aboutsummaryrefslogtreecommitdiff
path: root/src/policy/fees.h
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-05-21 10:47:37 +0300
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-05-21 11:35:47 +0300
commit5ee5b696b588695ff78aaac08d5d85154f1953cf (patch)
tree290f7fb552b79c18387250b522c2f1304ff372e6 /src/policy/fees.h
parent5c3033d45e5ec15499ce7a0222ffa0210a0f66bc (diff)
downloadbitcoin-5ee5b696b588695ff78aaac08d5d85154f1953cf.tar.xz
refactor: Add non-thread-safe CBlockPolicyEstimator::_removeTx helper
This changes removes recursion in the m_cs_fee_estimator locks.
Diffstat (limited to 'src/policy/fees.h')
-rw-r--r--src/policy/fees.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/policy/fees.h b/src/policy/fees.h
index a1fddc9562..fdbf956930 100644
--- a/src/policy/fees.h
+++ b/src/policy/fees.h
@@ -194,7 +194,8 @@ public:
EXCLUSIVE_LOCKS_REQUIRED(!m_cs_fee_estimator);
/** Remove a transaction from the mempool tracking stats*/
- bool removeTx(uint256 hash, bool inBlock);
+ bool removeTx(uint256 hash, bool inBlock)
+ EXCLUSIVE_LOCKS_REQUIRED(!m_cs_fee_estimator);
/** DEPRECATED. Return a feerate estimate */
CFeeRate estimateFee(int confTarget) const
@@ -278,6 +279,10 @@ private:
unsigned int HistoricalBlockSpan() const EXCLUSIVE_LOCKS_REQUIRED(m_cs_fee_estimator);
/** Calculation of highest target that reasonable estimate can be provided for */
unsigned int MaxUsableEstimate() const EXCLUSIVE_LOCKS_REQUIRED(m_cs_fee_estimator);
+
+ /** A non-thread-safe helper for the removeTx function */
+ bool _removeTx(const uint256& hash, bool inBlock)
+ EXCLUSIVE_LOCKS_REQUIRED(m_cs_fee_estimator);
};
class FeeFilterRounder