Changeset View
Changeset View
Standalone View
Standalone View
src/qt/coincontroldialog.cpp
Show First 20 Lines • Show All 540 Lines • ▼ Show 20 Lines | if (nQuantity > 0) { | ||||
// accurate | // accurate | ||||
if (CoinControlDialog::fSubtractFeeFromAmount) { | if (CoinControlDialog::fSubtractFeeFromAmount) { | ||||
if (nAmount - nPayAmount == Amount::zero()) { | if (nAmount - nPayAmount == Amount::zero()) { | ||||
nBytes -= 34; | nBytes -= 34; | ||||
} | } | ||||
} | } | ||||
// Fee | // Fee | ||||
nPayFee = GetMinimumFee(nBytes, g_mempool); | nPayFee = GetMinimumFee(nBytes, g_mempool, *coinControl); | ||||
if (nPayAmount > Amount::zero()) { | if (nPayAmount > Amount::zero()) { | ||||
nChange = nAmount - nPayAmount; | nChange = nAmount - nPayAmount; | ||||
if (!CoinControlDialog::fSubtractFeeFromAmount) { | if (!CoinControlDialog::fSubtractFeeFromAmount) { | ||||
nChange -= nPayFee; | nChange -= nPayFee; | ||||
} | } | ||||
// Never create dust outputs; if we would, just add the dust to the | // Never create dust outputs; if we would, just add the dust to the | ||||
▲ Show 20 Lines • Show All 273 Lines • Show Last 20 Lines |