Changeset View
Changeset View
Standalone View
Standalone View
src/policy/fees.h
Show First 20 Lines • Show All 192 Lines • ▼ Show 20 Lines | |||||
* blocks for X to be big enough */ | * blocks for X to be big enough */ | ||||
static const double MIN_SUCCESS_PCT = .95; | static const double MIN_SUCCESS_PCT = .95; | ||||
/** Require an avg of 1 tx in the combined feerate bucket per block to have stat | /** Require an avg of 1 tx in the combined feerate bucket per block to have stat | ||||
* significance */ | * significance */ | ||||
static const double SUFFICIENT_FEETXS = 1; | static const double SUFFICIENT_FEETXS = 1; | ||||
// Minimum and Maximum values for tracking feerates | // Minimum and Maximum values for tracking feerates | ||||
static constexpr double MIN_FEERATE = 10; | static constexpr Amount MIN_FEERATE(10); | ||||
static const Amount MAX_FEERATE(int64_t(1e7)); | static const Amount MAX_FEERATE(int64_t(1e7)); | ||||
static const Amount INF_FEERATE(MAX_MONEY); | static const Amount INF_FEERATE(MAX_MONEY); | ||||
static const Amount INF_PRIORITY(int64_t(1e9) * MAX_MONEY); | static const Amount INF_PRIORITY(int64_t(1e9) * MAX_MONEY); | ||||
// We have to lump transactions into buckets based on feerate, but we want to be | // We have to lump transactions into buckets based on feerate, but we want to be | ||||
// able to give accurate estimates over a large range of potential feerates. | // able to give accurate estimates over a large range of potential feerates. | ||||
// Therefore it makes sense to exponentially space the buckets | // Therefore it makes sense to exponentially space the buckets | ||||
/** Spacing of FeeRate buckets */ | /** Spacing of FeeRate buckets */ | ||||
static const int64_t FEE_SPACING_FRACTION = 10; | static const double FEE_SPACING = 1.1; | ||||
/** | /** | ||||
* We want to be able to estimate feerates that are needed on tx's to be | * We want to be able to estimate feerates that are needed on tx's to be | ||||
* included in a certain number of blocks. Every time a block is added to the | * included in a certain number of blocks. Every time a block is added to the | ||||
* best chain, this class records stats on the transactions included in that | * best chain, this class records stats on the transactions included in that | ||||
* block | * block | ||||
*/ | */ | ||||
class CBlockPolicyEstimator { | class CBlockPolicyEstimator { | ||||
▲ Show 20 Lines • Show All 88 Lines • Show Last 20 Lines |