diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2018-12-02 21:28:53 +0100 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2018-12-03 00:14:33 +0100 |
commit | dae1423e5aaa9923f1b11be4650e343f3235d46a (patch) | |
tree | 4be1cf878780ffdd9bb17d00fc32a1df36020267 /src | |
parent | 764e42fee2df1253db6407bd8e1e477d31e9350c (diff) |
Add locking annotations to feeStats, shortStats and longStats
Diffstat (limited to 'src')
-rw-r--r-- | src/policy/fees.cpp | 1 | ||||
-rw-r--r-- | src/policy/fees.h | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/policy/fees.cpp b/src/policy/fees.cpp index b958270c3b..c49b9fa36b 100644 --- a/src/policy/fees.cpp +++ b/src/policy/fees.cpp @@ -710,6 +710,7 @@ CFeeRate CBlockPolicyEstimator::estimateRawFee(int confTarget, double successThr unsigned int CBlockPolicyEstimator::HighestTargetTracked(FeeEstimateHorizon horizon) const { + LOCK(m_cs_fee_estimator); switch (horizon) { case FeeEstimateHorizon::SHORT_HALFLIFE: { return shortStats->GetMaxConfirms(); diff --git a/src/policy/fees.h b/src/policy/fees.h index e303686c73..c8472a12f5 100644 --- a/src/policy/fees.h +++ b/src/policy/fees.h @@ -246,9 +246,9 @@ private: std::map<uint256, TxStatsInfo> mapMemPoolTxs GUARDED_BY(m_cs_fee_estimator); /** Classes to track historical data on transaction confirmations */ - std::unique_ptr<TxConfirmStats> feeStats; - std::unique_ptr<TxConfirmStats> shortStats; - std::unique_ptr<TxConfirmStats> longStats; + std::unique_ptr<TxConfirmStats> feeStats PT_GUARDED_BY(m_cs_fee_estimator); + std::unique_ptr<TxConfirmStats> shortStats PT_GUARDED_BY(m_cs_fee_estimator); + std::unique_ptr<TxConfirmStats> longStats PT_GUARDED_BY(m_cs_fee_estimator); unsigned int trackedTxs GUARDED_BY(m_cs_fee_estimator); unsigned int untrackedTxs GUARDED_BY(m_cs_fee_estimator); |