mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
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.
This commit is contained in:
parent
e54ebbf600
commit
22eca7da22
4 changed files with 75 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue