aboutsummaryrefslogtreecommitdiff
path: root/src/policy/fees.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2015-11-27 12:45:30 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2015-11-27 12:59:37 +0100
commite92377fa7f9a34a6e6474a1d03d6402856f90f38 (patch)
treebddaeed46e5fcf4a79256ce05a2d80f92e93c756 /src/policy/fees.h
parent05d591839fe1fefb0cf359083bce87cb128f75a6 (diff)
parente30443244a7a50f2db70e593ec8a57e5086db3d9 (diff)
Merge pull request #6134
e304432 Pass reference to estimateSmartFee and cleanup whitespace (Suhas Daftuar) 56106a3 Expose RPC calls for estimatesmart functions (Alex Morcos) e93a236 add estimateSmartFee to the unit test (Alex Morcos) 6303051 EstimateSmart functions consider mempool min fee (Alex Morcos) f22ac4a Increase success threshold for fee estimation to 95% (Alex Morcos) 4fe2823 Change wallet and GUI code to use new smart fee estimation calls. (Alex Morcos) 22eca7d Add smart fee estimation functions (Alex Morcos)
Diffstat (limited to 'src/policy/fees.h')
-rw-r--r--src/policy/fees.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/policy/fees.h b/src/policy/fees.h
index 15577d128a..7a293267d4 100644
--- a/src/policy/fees.h
+++ b/src/policy/fees.h
@@ -15,6 +15,7 @@
class CAutoFile;
class CFeeRate;
class CTxMemPoolEntry;
+class CTxMemPool;
/** \class CBlockPolicyEstimator
* The BlockPolicyEstimator is used for estimating the fee or priority needed
@@ -182,8 +183,8 @@ static const unsigned int MAX_BLOCK_CONFIRMS = 25;
/** Decay of .998 is a half-life of 346 blocks or about 2.4 days */
static const double DEFAULT_DECAY = .998;
-/** Require greater than 85% of X fee transactions to be confirmed within Y blocks for X to be big enough */
-static const double MIN_SUCCESS_PCT = .85;
+/** Require greater than 95% of X fee transactions to be confirmed within Y blocks for X to be big enough */
+static const double MIN_SUCCESS_PCT = .95;
static const double UNLIKELY_PCT = .5;
/** Require an avg of 1 tx in the combined fee bucket per block to have stat significance */
@@ -242,9 +243,21 @@ public:
/** Return a fee estimate */
CFeeRate estimateFee(int confTarget);
+ /** Estimate fee rate needed to get be included in a block within
+ * confTarget blocks. If no answer can be given at confTarget, return an
+ * estimate at the lowest target where one can be given.
+ */
+ CFeeRate estimateSmartFee(int confTarget, int *answerFoundAtTarget, const CTxMemPool& pool);
+
/** Return a priority estimate */
double estimatePriority(int confTarget);
+ /** Estimate priority needed to get be included in a block within
+ * confTarget blocks. If no answer can be given at confTarget, return an
+ * estimate at the lowest target where one can be given.
+ */
+ double estimateSmartPriority(int confTarget, int *answerFoundAtTarget, const CTxMemPool& pool);
+
/** Write estimation data to a file */
void Write(CAutoFile& fileout);