diff options
author | Russell Yanofsky <russ@yanofsky.org> | 2017-04-17 19:46:08 -0400 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2018-04-04 16:52:40 -0400 |
commit | 827de038ab6fa58aa3d46151eb2f8dc6add7743e (patch) | |
tree | f468c36b2f2b8a8e6f34c1ad1fc0dd4dfa275089 /src/qt/walletmodel.cpp | |
parent | a0704a8996bb950ae3c4d5b5a30e9dfe34cde1d3 (diff) |
Remove direct bitcoin calls from qt/coincontroldialog.cpp
Diffstat (limited to 'src/qt/walletmodel.cpp')
-rw-r--r-- | src/qt/walletmodel.cpp | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp index 7a19773cf7..8010b6097e 100644 --- a/src/qt/walletmodel.cpp +++ b/src/qt/walletmodel.cpp @@ -475,38 +475,6 @@ void WalletModel::UnlockContext::CopyFrom(const UnlockContext& rhs) rhs.relock = false; } -// returns a list of COutputs from COutPoints -void WalletModel::getOutputs(const std::vector<COutPoint>& vOutpoints, std::vector<COutput>& vOutputs) -{ - LOCK2(cs_main, cwallet->cs_wallet); - for (const COutPoint& outpoint : vOutpoints) - { - auto it = cwallet->mapWallet.find(outpoint.hash); - if (it == cwallet->mapWallet.end()) continue; - int nDepth = it->second.GetDepthInMainChain(); - if (nDepth < 0) continue; - COutput out(&it->second, outpoint.n, nDepth, true /* spendable */, true /* solvable */, true /* safe */); - vOutputs.push_back(out); - } -} - -bool WalletModel::isSpent(const COutPoint& outpoint) const -{ - LOCK2(cs_main, cwallet->cs_wallet); - return cwallet->IsSpent(outpoint.hash, outpoint.n); -} - -// AvailableCoins + LockedCoins grouped by wallet address (put change in one group with wallet address) -void WalletModel::listCoins(std::map<QString, std::vector<COutput> >& mapCoins) const -{ - for (auto& group : cwallet->ListCoins()) { - auto& resultGroup = mapCoins[QString::fromStdString(EncodeDestination(group.first))]; - for (auto& coin : group.second) { - resultGroup.emplace_back(std::move(coin)); - } - } -} - void WalletModel::loadReceiveRequests(std::vector<std::string>& vReceiveRequests) { vReceiveRequests = m_wallet->getDestValues("rr"); // receive request |