Bugfix: do not mark all future coins spent

This commit is contained in:
Pieter Wuille 2012-10-21 15:19:13 +02:00
parent d12b694106
commit ddba582377
1 changed files with 2 additions and 2 deletions

View File

@ -780,8 +780,8 @@ void CWallet::ReacceptWalletTransactions()
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++)