Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.cpp
Show First 20 Lines • Show All 2,782 Lines • ▼ Show 20 Lines | if (!CreateTransaction(vecSend, tx_new, reservekey, nFeeRet, | ||||
nChangePosInOut, strFailReason, coinControl, | nChangePosInOut, strFailReason, coinControl, | ||||
false)) { | false)) { | ||||
return false; | return false; | ||||
} | } | ||||
if (nChangePosInOut != -1) { | if (nChangePosInOut != -1) { | ||||
tx.vout.insert(tx.vout.begin() + nChangePosInOut, | tx.vout.insert(tx.vout.begin() + nChangePosInOut, | ||||
tx_new->vout[nChangePosInOut]); | tx_new->vout[nChangePosInOut]); | ||||
// we dont have the normal Create/Commit cycle, and dont want to risk | // we don't have the normal Create/Commit cycle, and don't want to risk | ||||
// reusing change, so just remove the key from the keypool here. | // reusing change, so just remove the key from the keypool here. | ||||
reservekey.KeepKey(); | reservekey.KeepKey(); | ||||
} | } | ||||
// Copy output sizes from new transaction; they may have had the fee | // Copy output sizes from new transaction; they may have had the fee | ||||
// subtracted from them. | // subtracted from them. | ||||
for (size_t idx = 0; idx < tx.vout.size(); idx++) { | for (size_t idx = 0; idx < tx.vout.size(); idx++) { | ||||
tx.vout[idx].nValue = tx_new->vout[idx].nValue; | tx.vout[idx].nValue = tx_new->vout[idx].nValue; | ||||
▲ Show 20 Lines • Show All 1,666 Lines • Show Last 20 Lines |