[wallet] Refactor to use new MIN_CHANGE
* Introduce new constant MIN_CHANGE and use it instead of the hardcoded "CENT" * Add test case for MIN_CHANGE * Introduce new constant for -mintxfee default: DEFAULT_TRANSACTION_MINFEE = 1000
This commit is contained in:
@@ -567,7 +567,7 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
|
||||
nChange -= nPayFee;
|
||||
|
||||
// Never create dust outputs; if we would, just add the dust to the fee.
|
||||
if (nChange > 0 && nChange < CENT)
|
||||
if (nChange > 0 && nChange < MIN_CHANGE)
|
||||
{
|
||||
CTxOut txout(nChange, (CScript)std::vector<unsigned char>(24, 0));
|
||||
if (txout.IsDust(::minRelayTxFee))
|
||||
|
||||
Reference in New Issue
Block a user