Simplify feebumper minimum fee code slightly
No change in behavior. Get rid of specifiedConfirmTarget if/else block and rename specifiedConfirmTarget and ignoreUserSetFee variables to ignoreGlobalPayTxFee.
This commit is contained in:
@@ -2890,12 +2890,12 @@ CAmount CWallet::GetRequiredFee(unsigned int nTxBytes)
|
||||
return std::max(minTxFee.GetFee(nTxBytes), ::minRelayTxFee.GetFee(nTxBytes));
|
||||
}
|
||||
|
||||
CAmount CWallet::GetMinimumFee(unsigned int nTxBytes, unsigned int nConfirmTarget, const CTxMemPool& pool, const CBlockPolicyEstimator& estimator, bool ignoreUserSetFee)
|
||||
CAmount CWallet::GetMinimumFee(unsigned int nTxBytes, unsigned int nConfirmTarget, const CTxMemPool& pool, const CBlockPolicyEstimator& estimator, bool ignoreGlobalPayTxFee)
|
||||
{
|
||||
// payTxFee is the user-set global for desired feerate
|
||||
CAmount nFeeNeeded = payTxFee.GetFee(nTxBytes);
|
||||
// User didn't set: use -txconfirmtarget to estimate...
|
||||
if (nFeeNeeded == 0 || ignoreUserSetFee) {
|
||||
if (nFeeNeeded == 0 || ignoreGlobalPayTxFee) {
|
||||
int estimateFoundTarget = nConfirmTarget;
|
||||
nFeeNeeded = estimator.estimateSmartFee(nConfirmTarget, &estimateFoundTarget, pool).GetFee(nTxBytes);
|
||||
// ... unless we don't have enough mempool data for estimatefee, then use fallbackFee
|
||||
|
||||
Reference in New Issue
Block a user