|
|
@ -301,10 +301,10 @@ bool CBlockPolicyEstimator::removeTx(uint256 hash) |
|
|
|
CBlockPolicyEstimator::CBlockPolicyEstimator(const CFeeRate& _minRelayFee) |
|
|
|
CBlockPolicyEstimator::CBlockPolicyEstimator(const CFeeRate& _minRelayFee) |
|
|
|
: nBestSeenHeight(0), trackedTxs(0), untrackedTxs(0) |
|
|
|
: nBestSeenHeight(0), trackedTxs(0), untrackedTxs(0) |
|
|
|
{ |
|
|
|
{ |
|
|
|
static_assert(MIN_FEERATE > 0, "Min feerate must be nonzero"); |
|
|
|
static_assert(MIN_BUCKET_FEERATE > 0, "Min feerate must be nonzero"); |
|
|
|
minTrackedFee = _minRelayFee < CFeeRate(MIN_FEERATE) ? CFeeRate(MIN_FEERATE) : _minRelayFee; |
|
|
|
minTrackedFee = _minRelayFee < CFeeRate(MIN_BUCKET_FEERATE) ? CFeeRate(MIN_BUCKET_FEERATE) : _minRelayFee; |
|
|
|
std::vector<double> vfeelist; |
|
|
|
std::vector<double> vfeelist; |
|
|
|
for (double bucketBoundary = minTrackedFee.GetFeePerK(); bucketBoundary <= MAX_FEERATE; bucketBoundary *= FEE_SPACING) { |
|
|
|
for (double bucketBoundary = minTrackedFee.GetFeePerK(); bucketBoundary <= MAX_BUCKET_FEERATE; bucketBoundary *= FEE_SPACING) { |
|
|
|
vfeelist.push_back(bucketBoundary); |
|
|
|
vfeelist.push_back(bucketBoundary); |
|
|
|
} |
|
|
|
} |
|
|
|
vfeelist.push_back(INF_FEERATE); |
|
|
|
vfeelist.push_back(INF_FEERATE); |
|
|
@ -492,7 +492,7 @@ FeeFilterRounder::FeeFilterRounder(const CFeeRate& minIncrementalFee) |
|
|
|
{ |
|
|
|
{ |
|
|
|
CAmount minFeeLimit = std::max(CAmount(1), minIncrementalFee.GetFeePerK() / 2); |
|
|
|
CAmount minFeeLimit = std::max(CAmount(1), minIncrementalFee.GetFeePerK() / 2); |
|
|
|
feeset.insert(0); |
|
|
|
feeset.insert(0); |
|
|
|
for (double bucketBoundary = minFeeLimit; bucketBoundary <= MAX_FEERATE; bucketBoundary *= FEE_SPACING) { |
|
|
|
for (double bucketBoundary = minFeeLimit; bucketBoundary <= MAX_BUCKET_FEERATE; bucketBoundary *= FEE_SPACING) { |
|
|
|
feeset.insert(bucketBoundary); |
|
|
|
feeset.insert(bucketBoundary); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|