aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpcwallet.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2015-06-15 09:02:05 +0200
committerWladimir J. van der Laan <[email protected]>2015-06-15 09:02:38 +0200
commitf3d4dbb93991f1904a5bff4cf000fce930cbb3c7 (patch)
tree32d6d140832c60ffdd9aead6db7e710cd665c212 /src/wallet/rpcwallet.cpp
parentdoc: Add section on plurals to strings policy (diff)
parentFix getbalance * (diff)
downloaddiscoin-f3d4dbb93991f1904a5bff4cf000fce930cbb3c7.tar.xz
discoin-f3d4dbb93991f1904a5bff4cf000fce930cbb3c7.zip
Merge pull request #6276
7d6a85a Fix getbalance * (Tom Harding)
Diffstat (limited to 'src/wallet/rpcwallet.cpp')
-rw-r--r--src/wallet/rpcwallet.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp
index d284fcf15..43fcc632f 100644
--- a/src/wallet/rpcwallet.cpp
+++ b/src/wallet/rpcwallet.cpp
@@ -733,12 +733,12 @@ UniValue getbalance(const UniValue& 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 '*' 0 should return the same number
+ // getbalance and "getbalance * 1 true" should return the same number
CAmount nBalance = 0;
for (map<uint256, CWalletTx>::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it)
{
const CWalletTx& wtx = (*it).second;
- if (!wtx.IsTrusted() || wtx.GetBlocksToMaturity() > 0)
+ if (!CheckFinalTx(wtx) || wtx.GetBlocksToMaturity() > 0 || wtx.GetDepthInMainChain() < 0)
continue;
CAmount allFee;