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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user