|
|
@ -505,7 +505,7 @@ CFeeRate CBlockPolicyEstimator::estimateFee(int confTarget) |
|
|
|
return CFeeRate(median); |
|
|
|
return CFeeRate(median); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
CFeeRate CBlockPolicyEstimator::estimateSmartFee(int confTarget, int *answerFoundAtTarget, const CTxMemPool *pool) |
|
|
|
CFeeRate CBlockPolicyEstimator::estimateSmartFee(int confTarget, int *answerFoundAtTarget, const CTxMemPool& pool) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (answerFoundAtTarget) |
|
|
|
if (answerFoundAtTarget) |
|
|
|
*answerFoundAtTarget = confTarget; |
|
|
|
*answerFoundAtTarget = confTarget; |
|
|
@ -522,7 +522,7 @@ CFeeRate CBlockPolicyEstimator::estimateSmartFee(int confTarget, int *answerFoun |
|
|
|
*answerFoundAtTarget = confTarget - 1; |
|
|
|
*answerFoundAtTarget = confTarget - 1; |
|
|
|
|
|
|
|
|
|
|
|
// If mempool is limiting txs , return at least the min fee from the mempool
|
|
|
|
// If mempool is limiting txs , return at least the min fee from the mempool
|
|
|
|
CAmount minPoolFee = pool->GetMinFee(GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000).GetFeePerK(); |
|
|
|
CAmount minPoolFee = pool.GetMinFee(GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000).GetFeePerK(); |
|
|
|
if (minPoolFee > 0 && minPoolFee > median) |
|
|
|
if (minPoolFee > 0 && minPoolFee > median) |
|
|
|
return CFeeRate(minPoolFee); |
|
|
|
return CFeeRate(minPoolFee); |
|
|
|
|
|
|
|
|
|
|
@ -541,7 +541,7 @@ double CBlockPolicyEstimator::estimatePriority(int confTarget) |
|
|
|
return priStats.EstimateMedianVal(confTarget, SUFFICIENT_PRITXS, MIN_SUCCESS_PCT, true, nBestSeenHeight); |
|
|
|
return priStats.EstimateMedianVal(confTarget, SUFFICIENT_PRITXS, MIN_SUCCESS_PCT, true, nBestSeenHeight); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
double CBlockPolicyEstimator::estimateSmartPriority(int confTarget, int *answerFoundAtTarget, const CTxMemPool *pool) |
|
|
|
double CBlockPolicyEstimator::estimateSmartPriority(int confTarget, int *answerFoundAtTarget, const CTxMemPool& pool) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (answerFoundAtTarget) |
|
|
|
if (answerFoundAtTarget) |
|
|
|
*answerFoundAtTarget = confTarget; |
|
|
|
*answerFoundAtTarget = confTarget; |
|
|
@ -550,7 +550,7 @@ double CBlockPolicyEstimator::estimateSmartPriority(int confTarget, int *answerF |
|
|
|
return -1; |
|
|
|
return -1; |
|
|
|
|
|
|
|
|
|
|
|
// If mempool is limiting txs, no priority txs are allowed
|
|
|
|
// If mempool is limiting txs, no priority txs are allowed
|
|
|
|
CAmount minPoolFee = pool->GetMinFee(GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000).GetFeePerK(); |
|
|
|
CAmount minPoolFee = pool.GetMinFee(GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000).GetFeePerK(); |
|
|
|
if (minPoolFee > 0) |
|
|
|
if (minPoolFee > 0) |
|
|
|
return INF_PRIORITY; |
|
|
|
return INF_PRIORITY; |
|
|
|
|
|
|
|
|
|
|
@ -562,7 +562,6 @@ double CBlockPolicyEstimator::estimateSmartPriority(int confTarget, int *answerF |
|
|
|
if (answerFoundAtTarget) |
|
|
|
if (answerFoundAtTarget) |
|
|
|
*answerFoundAtTarget = confTarget - 1; |
|
|
|
*answerFoundAtTarget = confTarget - 1; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return median; |
|
|
|
return median; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|