diff options
| author | Gavin Andresen <[email protected]> | 2014-02-15 16:38:28 -0500 |
|---|---|---|
| committer | Gavin Andresen <[email protected]> | 2014-02-26 11:53:51 -0500 |
| commit | 93a18a3650292afbb441a47d1fa1b94aeb0164e3 (patch) | |
| tree | 36382e2077820d469fd1257ee35375a86206a878 /src/qt/walletmodel.cpp | |
| parent | Merge pull request #3704 from gavinandresen/wallet_lock_fixes (diff) | |
| download | discoin-93a18a3650292afbb441a47d1fa1b94aeb0164e3.tar.xz discoin-93a18a3650292afbb441a47d1fa1b94aeb0164e3.zip | |
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.
Diffstat (limited to 'src/qt/walletmodel.cpp')
| -rw-r--r-- | src/qt/walletmodel.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp index 3549cd49f..eae448fee 100644 --- a/src/qt/walletmodel.cpp +++ b/src/qt/walletmodel.cpp @@ -501,6 +501,12 @@ void WalletModel::getOutputs(const std::vector<COutPoint>& 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<QString, std::vector<COutput> >& mapCoins) const { |