mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 10:38:42 +01:00
feebumper: discard change outputs below discard rate
This commit is contained in:
parent
2405ce1df0
commit
5805d6fead
@ -194,7 +194,7 @@ Result CreateTransaction(const CWallet* wallet, const uint256& txid, const CCoin
|
||||
|
||||
// If the output would become dust, discard it (converting the dust to fee)
|
||||
poutput->nValue -= nDelta;
|
||||
if (poutput->nValue <= GetDustThreshold(*poutput, ::dustRelayFee)) {
|
||||
if (poutput->nValue <= GetDustThreshold(*poutput, GetDiscardRate(::feeEstimator))) {
|
||||
LogPrint(BCLog::RPC, "Bumping fee and discarding dust output\n");
|
||||
new_fee += poutput->nValue;
|
||||
mtx.vout.erase(mtx.vout.begin() + nOutput);
|
||||
|
Loading…
Reference in New Issue
Block a user