aboutsummaryrefslogtreecommitdiff
path: root/src/qt/coincontroldialog.cpp
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2014-02-15 16:38:28 -0500
committerGavin Andresen <gavinandresen@gmail.com>2014-02-26 11:53:51 -0500
commit93a18a3650292afbb441a47d1fa1b94aeb0164e3 (patch)
tree36382e2077820d469fd1257ee35375a86206a878 /src/qt/coincontroldialog.cpp
parenta16ad1c0f465935d437bd9ae9875b28be49ec65b (diff)
downloadbitcoin-93a18a3650292afbb441a47d1fa1b94aeb0164e3.tar.xz
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/coincontroldialog.cpp')
-rw-r--r--src/qt/coincontroldialog.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp
index e1a9140f45..2d8fcd7a52 100644
--- a/src/qt/coincontroldialog.cpp
+++ b/src/qt/coincontroldialog.cpp
@@ -468,11 +468,12 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
BOOST_FOREACH(const COutput& out, vOutputs)
{
- // unselect already spent, very unlikely scenario, this could happen when selected are spent elsewhere, like rpc or another computer
- if (out.tx->IsSpent(out.i))
+ // unselect already spent, very unlikely scenario, this could happen
+ // when selected are spent elsewhere, like rpc or another computer
+ uint256 txhash = out.tx->GetHash();
+ COutPoint outpt(txhash, out.i);
+ if (model->isSpent(outpt))
{
- uint256 txhash = out.tx->GetHash();
- COutPoint outpt(txhash, out.i);
coinControl->UnSelect(outpt);
continue;
}