File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -298,11 +298,11 @@ bool CBlockPolicyEstimator::removeTx(uint256 hash)
298
298
}
299
299
}
300
300
301
- CBlockPolicyEstimator::CBlockPolicyEstimator (const CFeeRate& _minRelayFee )
301
+ CBlockPolicyEstimator::CBlockPolicyEstimator ()
302
302
: nBestSeenHeight(0 ), trackedTxs(0 ), untrackedTxs(0 )
303
303
{
304
304
static_assert (MIN_BUCKET_FEERATE > 0 , " Min feerate must be nonzero" );
305
- minTrackedFee = _minRelayFee < CFeeRate (MIN_BUCKET_FEERATE) ? CFeeRate (MIN_BUCKET_FEERATE) : _minRelayFee ;
305
+ minTrackedFee = CFeeRate (MIN_BUCKET_FEERATE);
306
306
std::vector<double > vfeelist;
307
307
for (double bucketBoundary = minTrackedFee.GetFeePerK (); bucketBoundary <= MAX_BUCKET_FEERATE; bucketBoundary *= FEE_SPACING) {
308
308
vfeelist.push_back (bucketBoundary);
Original file line number Diff line number Diff line change @@ -179,7 +179,12 @@ static const double MIN_SUCCESS_PCT = .95;
179
179
static const double SUFFICIENT_FEETXS = 1 ;
180
180
181
181
// Minimum and Maximum values for tracking feerates
182
- static constexpr double MIN_BUCKET_FEERATE = 10 ;
182
+ // The MIN_BUCKET_FEERATE should just be set to the lowest reasonable feerate we
183
+ // might ever want to track. Historically this has been 1000 since it was
184
+ // inheriting DEFAULT_MIN_RELAY_TX_FEE and changing it is disruptive as it
185
+ // invalidates old estimates files. So leave it at 1000 unless it becomes
186
+ // necessary to lower it, and then lower it substantially.
187
+ static constexpr double MIN_BUCKET_FEERATE = 1000 ;
183
188
static const double MAX_BUCKET_FEERATE = 1e7 ;
184
189
static const double INF_FEERATE = MAX_MONEY;
185
190
static const double INF_PRIORITY = 1e9 * MAX_MONEY;
@@ -199,7 +204,7 @@ class CBlockPolicyEstimator
199
204
{
200
205
public:
201
206
/* * Create new BlockPolicyEstimator and initialize stats tracking classes with default values */
202
- CBlockPolicyEstimator (const CFeeRate& minRelayFee );
207
+ CBlockPolicyEstimator ();
203
208
204
209
/* * Process all the transactions that have been included in a block */
205
210
void processBlock (unsigned int nBlockHeight,
Original file line number Diff line number Diff line change @@ -358,7 +358,7 @@ CTxMemPool::CTxMemPool(const CFeeRate& _minReasonableRelayFee) :
358
358
// of transactions in the pool
359
359
nCheckFrequency = 0 ;
360
360
361
- minerPolicyEstimator = new CBlockPolicyEstimator (_minReasonableRelayFee );
361
+ minerPolicyEstimator = new CBlockPolicyEstimator ();
362
362
}
363
363
364
364
CTxMemPool::~CTxMemPool ()
You can’t perform that action at this time.
0 commit comments