Changeset View
Changeset View
Standalone View
Standalone View
src/qt/coincontroldialog.cpp
Show First 20 Lines • Show All 548 Lines • ▼ Show 20 Lines | if (nQuantity > 0) { | ||||
// 29 = 180 - 151 (uncompressed public keys are over the limit. max 151 | // 29 = 180 - 151 (uncompressed public keys are over the limit. max 151 | ||||
// bytes of the input are ignored for priority) | // bytes of the input are ignored for priority) | ||||
dPriority = dPriorityInputs / | dPriority = dPriorityInputs / | ||||
(nBytes - nBytesInputs + (nQuantityUncompressed * 29)); | (nBytes - nBytesInputs + (nQuantityUncompressed * 29)); | ||||
double dPriorityNeeded = | double dPriorityNeeded = | ||||
std::max(mempoolEstimatePriority, AllowFreeThreshold()); | std::max(mempoolEstimatePriority, AllowFreeThreshold()); | ||||
fAllowFree = (dPriority >= dPriorityNeeded); | fAllowFree = (dPriority >= dPriorityNeeded); | ||||
if (fSendFreeTransactions) { | |||||
if (fAllowFree && nBytes <= MAX_FREE_TRANSACTION_CREATE_SIZE) { | |||||
nPayFee = Amount(0); | |||||
} | |||||
} | |||||
if (nPayAmount > Amount(0)) { | if (nPayAmount > Amount(0)) { | ||||
nChange = nAmount - nPayAmount; | nChange = nAmount - nPayAmount; | ||||
if (!CoinControlDialog::fSubtractFeeFromAmount) nChange -= nPayFee; | if (!CoinControlDialog::fSubtractFeeFromAmount) 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 | ||||
// fee. | // fee. | ||||
if (nChange > Amount(0) && nChange < MIN_CHANGE) { | if (nChange > Amount(0) && nChange < MIN_CHANGE) { | ||||
CTxOut txout(nChange, (CScript)std::vector<uint8_t>(24, 0)); | CTxOut txout(nChange, (CScript)std::vector<uint8_t>(24, 0)); | ||||
▲ Show 20 Lines • Show All 280 Lines • Show Last 20 Lines |