@@ -186,44 +186,55 @@ class CBlockPolicyEstimator
186
186
187
187
/* * Process all the transactions that have been included in a block */
188
188
void processBlock (unsigned int nBlockHeight,
189
- std::vector<const CTxMemPoolEntry*>& entries);
189
+ std::vector<const CTxMemPoolEntry*>& entries)
190
+ EXCLUSIVE_LOCKS_REQUIRED(!m_cs_fee_estimator);
190
191
191
192
/* * Process a transaction accepted to the mempool*/
192
- void processTransaction (const CTxMemPoolEntry& entry, bool validFeeEstimate);
193
+ void processTransaction (const CTxMemPoolEntry& entry, bool validFeeEstimate)
194
+ EXCLUSIVE_LOCKS_REQUIRED(!m_cs_fee_estimator);
193
195
194
196
/* * Remove a transaction from the mempool tracking stats*/
195
197
bool removeTx (uint256 hash, bool inBlock);
196
198
197
199
/* * DEPRECATED. Return a feerate estimate */
198
- CFeeRate estimateFee (int confTarget) const ;
200
+ CFeeRate estimateFee (int confTarget) const
201
+ EXCLUSIVE_LOCKS_REQUIRED(!m_cs_fee_estimator);
199
202
200
203
/* * Estimate feerate needed to get be included in a block within confTarget
201
204
* blocks. If no answer can be given at confTarget, return an estimate at
202
205
* the closest target where one can be given. 'conservative' estimates are
203
206
* valid over longer time horizons also.
204
207
*/
205
- CFeeRate estimateSmartFee (int confTarget, FeeCalculation *feeCalc, bool conservative) const ;
208
+ CFeeRate estimateSmartFee (int confTarget, FeeCalculation *feeCalc, bool conservative) const
209
+ EXCLUSIVE_LOCKS_REQUIRED(!m_cs_fee_estimator);
206
210
207
211
/* * Return a specific fee estimate calculation with a given success
208
212
* threshold and time horizon, and optionally return detailed data about
209
213
* calculation
210
214
*/
211
- CFeeRate estimateRawFee (int confTarget, double successThreshold, FeeEstimateHorizon horizon, EstimationResult *result = nullptr ) const ;
215
+ CFeeRate estimateRawFee (int confTarget, double successThreshold, FeeEstimateHorizon horizon,
216
+ EstimationResult* result = nullptr ) const
217
+ EXCLUSIVE_LOCKS_REQUIRED(!m_cs_fee_estimator);
212
218
213
219
/* * Write estimation data to a file */
214
- bool Write (CAutoFile& fileout) const ;
220
+ bool Write (CAutoFile& fileout) const
221
+ EXCLUSIVE_LOCKS_REQUIRED(!m_cs_fee_estimator);
215
222
216
223
/* * Read estimation data from a file */
217
- bool Read (CAutoFile& filein);
224
+ bool Read (CAutoFile& filein)
225
+ EXCLUSIVE_LOCKS_REQUIRED(!m_cs_fee_estimator);
218
226
219
227
/* * Empty mempool transactions on shutdown to record failure to confirm for txs still in mempool */
220
- void FlushUnconfirmed ();
228
+ void FlushUnconfirmed ()
229
+ EXCLUSIVE_LOCKS_REQUIRED(!m_cs_fee_estimator);
221
230
222
231
/* * Calculation of highest target that estimates are tracked for */
223
- unsigned int HighestTargetTracked (FeeEstimateHorizon horizon) const ;
232
+ unsigned int HighestTargetTracked (FeeEstimateHorizon horizon) const
233
+ EXCLUSIVE_LOCKS_REQUIRED(!m_cs_fee_estimator);
224
234
225
235
/* * Drop still unconfirmed transactions and record current estimations, if the fee estimation file is present. */
226
- void Flush ();
236
+ void Flush ()
237
+ EXCLUSIVE_LOCKS_REQUIRED(!m_cs_fee_estimator);
227
238
228
239
private:
229
240
mutable RecursiveMutex m_cs_fee_estimator;
0 commit comments