mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +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)
|
// 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 New Issue
Block a user