diff --git a/src/policy/fees.cpp b/src/policy/fees.cpp index b958270c3ba..c49b9fa36b9 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 e303686c739..c8472a12f5d 100644 --- a/src/policy/fees.h +++ b/src/policy/fees.h @@ -246,9 +246,9 @@ private: std::map mapMemPoolTxs GUARDED_BY(m_cs_fee_estimator); /** Classes to track historical data on transaction confirmations */ - std::unique_ptr feeStats; - std::unique_ptr shortStats; - std::unique_ptr longStats; + std::unique_ptr feeStats PT_GUARDED_BY(m_cs_fee_estimator); + std::unique_ptr shortStats PT_GUARDED_BY(m_cs_fee_estimator); + std::unique_ptr 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);