diff options
| author | Alex Morcos <[email protected]> | 2015-11-16 15:10:22 -0500 |
|---|---|---|
| committer | Alex Morcos <[email protected]> | 2015-11-16 15:33:06 -0500 |
| commit | 22eca7da22b67409d757d6859b1cf212e445dd39 (patch) | |
| tree | a5105ea18e0e84f7d30491da6b8e8fac66113529 /src/txmempool.cpp | |
| parent | Merge pull request #6954 (diff) | |
| download | discoin-22eca7da22b67409d757d6859b1cf212e445dd39.tar.xz discoin-22eca7da22b67409d757d6859b1cf212e445dd39.zip | |
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.cpp')
| -rw-r--r-- | src/txmempool.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/txmempool.cpp b/src/txmempool.cpp index a772e7ade..503e73d45 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -701,11 +701,21 @@ CFeeRate CTxMemPool::estimateFee(int nBlocks) const LOCK(cs); return minerPolicyEstimator->estimateFee(nBlocks); } +CFeeRate CTxMemPool::estimateSmartFee(int nBlocks, int *answerFoundAtBlocks) const +{ + LOCK(cs); + return minerPolicyEstimator->estimateSmartFee(nBlocks, answerFoundAtBlocks); +} double CTxMemPool::estimatePriority(int nBlocks) const { LOCK(cs); return minerPolicyEstimator->estimatePriority(nBlocks); } +double CTxMemPool::estimateSmartPriority(int nBlocks, int *answerFoundAtBlocks) const +{ + LOCK(cs); + return minerPolicyEstimator->estimateSmartPriority(nBlocks, answerFoundAtBlocks); +} bool CTxMemPool::WriteFeeEstimates(CAutoFile& fileout) const |