[wallet] remove MIN_CHANGE
This commit is contained in:
1 parent
a44236addd
commit
46f2fed6c5
3 files changed
+5
-15
No files matched your search
@@ -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