mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
[wallet] remove MIN_CHANGE
This commit is contained in:
@@ -32,7 +32,6 @@
|
||||
#include <QTreeWidget>
|
||||
|
||||
using wallet::CCoinControl;
|
||||
using wallet::MIN_CHANGE;
|
||||
|
||||
QList<CAmount> CoinControlDialog::payAmounts;
|
||||
bool CoinControlDialog::fSubtractFeeFromAmount = false;
|
||||
@@ -485,11 +484,10 @@ void CoinControlDialog::updateLabels(CCoinControl& m_coin_control, WalletModel *
|
||||
if (!CoinControlDialog::fSubtractFeeFromAmount)
|
||||
nChange -= nPayFee;
|
||||
|
||||
// Never create dust outputs; if we would, just add the dust to the fee.
|
||||
if (nChange > 0 && nChange < MIN_CHANGE)
|
||||
{
|
||||
if (nChange > 0) {
|
||||
// Assumes a p2pkh script size
|
||||
CTxOut txout(nChange, CScript() << std::vector<unsigned char>(24, 0));
|
||||
// Never create dust outputs; if we would, just add the dust to the fee.
|
||||
if (IsDust(txout, model->node().getDustRelayFee()))
|
||||
{
|
||||
nPayFee += nChange;
|
||||
|
||||
Reference in New Issue
Block a user