@@ -511,7 +511,7 @@ void TxConfirmStats::removeTx(unsigned int entryHeight, unsigned int nBestSeenHe
511
511
// of no harm to try to remove them again.
512
512
bool CBlockPolicyEstimator::removeTx (uint256 hash, bool inBlock)
513
513
{
514
- LOCK (cs_feeEstimator );
514
+ LOCK (m_cs_fee_estimator );
515
515
std::map<uint256, TxStatsInfo>::iterator pos = mapMemPoolTxs.find (hash);
516
516
if (pos != mapMemPoolTxs.end ()) {
517
517
feeStats->removeTx (pos->second .blockHeight , nBestSeenHeight, pos->second .bucketIndex , inBlock);
@@ -548,7 +548,7 @@ CBlockPolicyEstimator::~CBlockPolicyEstimator()
548
548
549
549
void CBlockPolicyEstimator::processTransaction (const CTxMemPoolEntry& entry, bool validFeeEstimate)
550
550
{
551
- LOCK (cs_feeEstimator );
551
+ LOCK (m_cs_fee_estimator );
552
552
unsigned int txHeight = entry.GetHeight ();
553
553
uint256 hash = entry.GetTx ().GetHash ();
554
554
if (mapMemPoolTxs.count (hash)) {
@@ -615,7 +615,7 @@ bool CBlockPolicyEstimator::processBlockTx(unsigned int nBlockHeight, const CTxM
615
615
void CBlockPolicyEstimator::processBlock (unsigned int nBlockHeight,
616
616
std::vector<const CTxMemPoolEntry*>& entries)
617
617
{
618
- LOCK (cs_feeEstimator );
618
+ LOCK (m_cs_fee_estimator );
619
619
if (nBlockHeight <= nBestSeenHeight) {
620
620
// Ignore side chains and re-orgs; assuming they are random
621
621
// they don't affect the estimate.
@@ -693,7 +693,7 @@ CFeeRate CBlockPolicyEstimator::estimateRawFee(int confTarget, double successThr
693
693
}
694
694
}
695
695
696
- LOCK (cs_feeEstimator );
696
+ LOCK (m_cs_fee_estimator );
697
697
// Return failure if trying to analyze a target we're not tracking
698
698
if (confTarget <= 0 || (unsigned int )confTarget > stats->GetMaxConfirms ())
699
699
return CFeeRate (0 );
@@ -710,6 +710,7 @@ CFeeRate CBlockPolicyEstimator::estimateRawFee(int confTarget, double successThr
710
710
711
711
unsigned int CBlockPolicyEstimator::HighestTargetTracked (FeeEstimateHorizon horizon) const
712
712
{
713
+ LOCK (m_cs_fee_estimator);
713
714
switch (horizon) {
714
715
case FeeEstimateHorizon::SHORT_HALFLIFE: {
715
716
return shortStats->GetMaxConfirms ();
@@ -819,7 +820,7 @@ double CBlockPolicyEstimator::estimateConservativeFee(unsigned int doubleTarget,
819
820
*/
820
821
CFeeRate CBlockPolicyEstimator::estimateSmartFee (int confTarget, FeeCalculation *feeCalc, bool conservative) const
821
822
{
822
- LOCK (cs_feeEstimator );
823
+ LOCK (m_cs_fee_estimator );
823
824
824
825
if (feeCalc) {
825
826
feeCalc->desiredTarget = confTarget;
@@ -899,7 +900,7 @@ CFeeRate CBlockPolicyEstimator::estimateSmartFee(int confTarget, FeeCalculation
899
900
bool CBlockPolicyEstimator::Write (CAutoFile& fileout) const
900
901
{
901
902
try {
902
- LOCK (cs_feeEstimator );
903
+ LOCK (m_cs_fee_estimator );
903
904
fileout << 149900 ; // version required to read: 0.14.99 or later
904
905
fileout << CLIENT_VERSION; // version that wrote the file
905
906
fileout << nBestSeenHeight;
@@ -924,7 +925,7 @@ bool CBlockPolicyEstimator::Write(CAutoFile& fileout) const
924
925
bool CBlockPolicyEstimator::Read (CAutoFile& filein)
925
926
{
926
927
try {
927
- LOCK (cs_feeEstimator );
928
+ LOCK (m_cs_fee_estimator );
928
929
int nVersionRequired, nVersionThatWrote;
929
930
filein >> nVersionRequired >> nVersionThatWrote;
930
931
if (nVersionRequired > CLIENT_VERSION)
@@ -983,7 +984,7 @@ bool CBlockPolicyEstimator::Read(CAutoFile& filein)
983
984
984
985
void CBlockPolicyEstimator::FlushUnconfirmed () {
985
986
int64_t startclear = GetTimeMicros ();
986
- LOCK (cs_feeEstimator );
987
+ LOCK (m_cs_fee_estimator );
987
988
size_t num_entries = mapMemPoolTxs.size ();
988
989
// Remove every entry in mapMemPoolTxs
989
990
while (!mapMemPoolTxs.empty ()) {
0 commit comments