From 93a18a3650292afbb441a47d1fa1b94aeb0164e3 Mon Sep 17 00:00:00 2001 From: Gavin Andresen Date: Sat, 15 Feb 2014 16:38:28 -0500 Subject: Remove CWalletTx::vfSpent Use the spent outpoint multimap to figure out which wallet transaction outputs are unspent, instead of a vfSpent array that is saved to disk. --- src/qt/walletmodel.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/qt/walletmodel.cpp') diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp index 3549cd49f0..eae448fee4 100644 --- a/src/qt/walletmodel.cpp +++ b/src/qt/walletmodel.cpp @@ -501,6 +501,12 @@ void WalletModel::getOutputs(const std::vector& vOutpoints, std::vect } } +bool WalletModel::isSpent(const COutPoint& outpoint) const +{ + LOCK(wallet->cs_wallet); + return wallet->IsSpent(outpoint.hash, outpoint.n); +} + // AvailableCoins + LockedCoins grouped by wallet address (put change in one group with wallet address) void WalletModel::listCoins(std::map >& mapCoins) const { -- cgit v1.2.3