aboutsummaryrefslogtreecommitdiff
path: root/src/txmempool.h
diff options
context:
space:
mode:
authorAlex Morcos <morcos@chaincode.com>2015-11-16 15:10:22 -0500
committerAlex Morcos <morcos@chaincode.com>2015-11-16 15:33:06 -0500
commit22eca7da22b67409d757d6859b1cf212e445dd39 (patch)
treea5105ea18e0e84f7d30491da6b8e8fac66113529 /src/txmempool.h
parente54ebbf6009716a7abcd4d8d3f7bd910e88decdc (diff)
downloadbitcoin-22eca7da22b67409d757d6859b1cf212e445dd39.tar.xz
Add smart fee estimation functions
These are more useful fee and priority estimation functions. If there is no fee/pri high enough for the target you are aiming for, it will give you the estimate for the lowest target that you can reliably obtain. This is better than defaulting to the minimum. It will also pass back the target for which it returned an answer.
Diffstat (limited to 'src/txmempool.h')
-rw-r--r--src/txmempool.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/txmempool.h b/src/txmempool.h
index 7b5843a8d0..5d8231fb77 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -454,9 +454,21 @@ public:
bool lookup(uint256 hash, CTransaction& result) const;
+ /** Estimate fee rate needed to get into the next nBlocks
+ * If no answer can be given at nBlocks, return an estimate
+ * at the lowest number of blocks where one can be given
+ */
+ CFeeRate estimateSmartFee(int nBlocks, int *answerFoundAtBlocks = NULL) const;
+
/** Estimate fee rate needed to get into the next nBlocks */
CFeeRate estimateFee(int nBlocks) const;
+ /** Estimate priority needed to get into the next nBlocks
+ * If no answer can be given at nBlocks, return an estimate
+ * at the lowest number of blocks where one can be given
+ */
+ double estimateSmartPriority(int nBlocks, int *answerFoundAtBlocks = NULL) const;
+
/** Estimate priority needed to get into the next nBlocks */
double estimatePriority(int nBlocks) const;