|
|
@ -2790,8 +2790,13 @@ CAmount CWallet::GetRequiredFee(unsigned int nTxBytes) |
|
|
|
|
|
|
|
|
|
|
|
CAmount CWallet::GetMinimumFee(unsigned int nTxBytes, unsigned int nConfirmTarget, const CTxMemPool& pool) |
|
|
|
CAmount CWallet::GetMinimumFee(unsigned int nTxBytes, unsigned int nConfirmTarget, const CTxMemPool& pool) |
|
|
|
{ |
|
|
|
{ |
|
|
|
// payTxFee is user-set "I want to pay this much"
|
|
|
|
// payTxFee is the user-set global for desired feerate
|
|
|
|
CAmount nFeeNeeded = payTxFee.GetFee(nTxBytes); |
|
|
|
return GetMinimumFee(nTxBytes, nConfirmTarget, pool, payTxFee.GetFee(nTxBytes)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CAmount CWallet::GetMinimumFee(unsigned int nTxBytes, unsigned int nConfirmTarget, const CTxMemPool& pool, CAmount targetFee) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
CAmount nFeeNeeded = targetFee; |
|
|
|
// User didn't set: use -txconfirmtarget to estimate...
|
|
|
|
// User didn't set: use -txconfirmtarget to estimate...
|
|
|
|
if (nFeeNeeded == 0) { |
|
|
|
if (nFeeNeeded == 0) { |
|
|
|
int estimateFoundTarget = nConfirmTarget; |
|
|
|
int estimateFoundTarget = nConfirmTarget; |
|
|
|