Permalink
Browse files

fix unconfirmed balance if wallet contains conflicted transactions

  • Loading branch information...
Tranz5 committed Jul 16, 2014
1 parent bd3e1cc commit 4f4323b1ba516fb82a8da6bc6ef557d480f8f49f
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/wallet.cpp
@@ -1059,7 +1059,7 @@ int64 CWallet::GetUnconfirmedBalance() const
for (map<uint256, CWalletTx>::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it)
{
const CWalletTx* pcoin = &(*it).second;
if (!pcoin->IsFinal() || !pcoin->IsTrusted())
if (!pcoin->IsFinal() || (!pcoin->IsTrusted() && pcoin->GetDepthInMainChain() == 0))
nTotal += pcoin->GetAvailableCredit();
}
}

0 comments on commit 4f4323b

Please sign in to comment.