aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rpcwallet.cpp4
-rw-r--r--src/wallet.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index 90a68f560a..76de42eef3 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -519,12 +519,12 @@ Value getbalance(const Array& params, bool fHelp)
if (params[0].get_str() == "*") {
// Calculate total balance a different way from GetBalance()
// (GetBalance() sums up all unspent TxOuts)
- // getbalance and getbalance '*' should always return the same number.
+ // getbalance and getbalance '*' 0 should return the same number
int64 nBalance = 0;
for (map<uint256, CWalletTx>::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it)
{
const CWalletTx& wtx = (*it).second;
- if (!wtx.IsFinal())
+ if (!wtx.IsConfirmed())
continue;
int64 allFee;
diff --git a/src/wallet.cpp b/src/wallet.cpp
index b8ef2a20bf..d3345cd870 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -899,7 +899,7 @@ int64 CWallet::GetBalance() const
for (map<uint256, CWalletTx>::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it)
{
const CWalletTx* pcoin = &(*it).second;
- if (pcoin->IsFinal() && pcoin->IsConfirmed())
+ if (pcoin->IsConfirmed())
nTotal += pcoin->GetAvailableCredit();
}
}