feebumper: discard change outputs below discard rate
This commit is contained in:
parent
2405ce1df0
commit
5805d6fead
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
// If the output would become dust, discard it (converting the dust to fee)
|
||||||
poutput->nValue -= nDelta;
|
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");
|
LogPrint(BCLog::RPC, "Bumping fee and discarding dust output\n");
|
||||||
new_fee += poutput->nValue;
|
new_fee += poutput->nValue;
|
||||||
mtx.vout.erase(mtx.vout.begin() + nOutput);
|
mtx.vout.erase(mtx.vout.begin() + nOutput);
|
||||||
|
|
Loading…
Reference in a new issue