Changeset View
Changeset View
Standalone View
Standalone View
src/qt/walletmodel.cpp
Show First 20 Lines • Show All 551 Lines • ▼ Show 20 Lines | |||||
void WalletModel::getOutputs(const std::vector<COutPoint> &vOutpoints, | void WalletModel::getOutputs(const std::vector<COutPoint> &vOutpoints, | ||||
std::vector<COutput> &vOutputs) { | std::vector<COutput> &vOutputs) { | ||||
LOCK2(cs_main, wallet->cs_wallet); | LOCK2(cs_main, wallet->cs_wallet); | ||||
for (const COutPoint &outpoint : vOutpoints) { | for (const COutPoint &outpoint : vOutpoints) { | ||||
if (!wallet->mapWallet.count(outpoint.GetTxId())) { | if (!wallet->mapWallet.count(outpoint.GetTxId())) { | ||||
continue; | continue; | ||||
} | } | ||||
int nDepth = | int nDepth = | ||||
wallet->mapWallet[outpoint.GetTxId()].GetDepthInMainChain(); | wallet->mapWallet.at(outpoint.GetTxId()).GetDepthInMainChain(); | ||||
if (nDepth < 0) { | if (nDepth < 0) { | ||||
continue; | continue; | ||||
} | } | ||||
COutput out(&wallet->mapWallet[outpoint.GetTxId()], outpoint.GetN(), | COutput out(&wallet->mapWallet.at(outpoint.GetTxId()), outpoint.GetN(), | ||||
jasonbcox: Just noting for other reviewers that a few of these changes are not in the original PR, but are… | |||||
nDepth, true /* spendable */, true /* solvable */, | nDepth, true /* spendable */, true /* solvable */, | ||||
true /* safe */); | true /* safe */); | ||||
vOutputs.push_back(out); | vOutputs.push_back(out); | ||||
} | } | ||||
} | } | ||||
bool WalletModel::isSpent(const COutPoint &outpoint) const { | bool WalletModel::isSpent(const COutPoint &outpoint) const { | ||||
LOCK2(cs_main, wallet->cs_wallet); | LOCK2(cs_main, wallet->cs_wallet); | ||||
▲ Show 20 Lines • Show All 90 Lines • Show Last 20 Lines |
Just noting for other reviewers that a few of these changes are not in the original PR, but are noted in the summary.