changeset 3672:c22baddfb828 draft

Merge pull request #1939 from sipa/bugfix_zerobalance Bugfix: do not mark all future coins spent
author Gregory Maxwell <greg@xiph.org>
date Sun, 21 Oct 2012 16:20:04 -0700
parents d899f4c3efda (current diff) defc5f78275c (diff)
children 41a54b4e95b2 27fdd7bebaf3
files
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -780,8 +780,8 @@
 
             CCoins coins;
             bool fUpdated = false;
-            bool fNotFound = pcoinsTip->GetCoins(wtx.GetHash(), coins);
-            if (!fNotFound || wtx.GetDepthInMainChain() > 0)
+            bool fFound = pcoinsTip->GetCoins(wtx.GetHash(), coins);
+            if (fFound || wtx.GetDepthInMainChain() > 0)
             {
                 // Update fSpent if a tx got spent somewhere else by a copy of wallet.dat
                 for (unsigned int i = 0; i < wtx.vout.size(); i++)