Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.cpp
Show First 20 Lines • Show All 2,430 Lines • ▼ Show 20 Lines | for (const auto &coin : availableCoins) { | ||||
FindNonChangeParentOutput(*coin.tx->tx, coin.i).scriptPubKey, | FindNonChangeParentOutput(*coin.tx->tx, coin.i).scriptPubKey, | ||||
address)) { | address)) { | ||||
result[address].emplace_back(std::move(coin)); | result[address].emplace_back(std::move(coin)); | ||||
} | } | ||||
} | } | ||||
std::vector<COutPoint> lockedCoins; | std::vector<COutPoint> lockedCoins; | ||||
ListLockedCoins(lockedCoins); | ListLockedCoins(lockedCoins); | ||||
// Include watch-only for wallets without private keys | // Include watch-only for LegacyScriptPubKeyMan wallets without private keys | ||||
const bool include_watch_only = | const bool include_watch_only = | ||||
GetLegacyScriptPubKeyMan() && | |||||
IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS); | IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS); | ||||
const isminetype is_mine_filter = | const isminetype is_mine_filter = | ||||
include_watch_only ? ISMINE_WATCH_ONLY : ISMINE_SPENDABLE; | include_watch_only ? ISMINE_WATCH_ONLY : ISMINE_SPENDABLE; | ||||
for (const auto &output : lockedCoins) { | for (const auto &output : lockedCoins) { | ||||
auto it = mapWallet.find(output.GetTxId()); | auto it = mapWallet.find(output.GetTxId()); | ||||
if (it != mapWallet.end()) { | if (it != mapWallet.end()) { | ||||
int depth = it->second.GetDepthInMainChain(); | int depth = it->second.GetDepthInMainChain(); | ||||
if (depth >= 0 && output.GetN() < it->second.tx->vout.size() && | if (depth >= 0 && output.GetN() < it->second.tx->vout.size() && | ||||
▲ Show 20 Lines • Show All 2,096 Lines • Show Last 20 Lines |