Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.cpp
Show First 20 Lines • Show All 2,486 Lines • ▼ Show 20 Lines | for (const auto &entry : mapWallet) { | ||||
} | } | ||||
isminetype mine = IsMine(pcoin->tx->vout[i]); | isminetype mine = IsMine(pcoin->tx->vout[i]); | ||||
if (mine == ISMINE_NO) { | if (mine == ISMINE_NO) { | ||||
continue; | continue; | ||||
} | } | ||||
bool fSpendableIn = ((mine & ISMINE_SPENDABLE) != ISMINE_NO) || | bool solvable = IsSolvable(*this, pcoin->tx->vout[i].scriptPubKey); | ||||
(coinControl && coinControl->fAllowWatchOnly && | bool spendable = | ||||
(mine & ISMINE_WATCH_SOLVABLE) != ISMINE_NO); | ((mine & ISMINE_SPENDABLE) != ISMINE_NO) || | ||||
bool fSolvableIn = | (((mine & ISMINE_WATCH_ONLY) != ISMINE_NO) && | ||||
(mine & (ISMINE_SPENDABLE | ISMINE_WATCH_SOLVABLE)) != | (coinControl && coinControl->fAllowWatchOnly && solvable)); | ||||
ISMINE_NO; | |||||
vCoins.push_back( | vCoins.push_back( | ||||
COutput(pcoin, i, nDepth, fSpendableIn, fSolvableIn, safeTx, | COutput(pcoin, i, nDepth, spendable, solvable, safeTx, | ||||
(coinControl && coinControl->fAllowWatchOnly))); | (coinControl && coinControl->fAllowWatchOnly))); | ||||
// Checks the sum amount of all UTXO's. | // Checks the sum amount of all UTXO's. | ||||
if (nMinimumSumAmount != MAX_MONEY) { | if (nMinimumSumAmount != MAX_MONEY) { | ||||
nTotal += pcoin->tx->vout[i].nValue; | nTotal += pcoin->tx->vout[i].nValue; | ||||
if (nTotal >= nMinimumSumAmount) { | if (nTotal >= nMinimumSumAmount) { | ||||
return; | return; | ||||
▲ Show 20 Lines • Show All 2,394 Lines • Show Last 20 Lines |