diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-06-15 09:02:05 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-06-15 09:02:38 +0200 |
commit | f3d4dbb93991f1904a5bff4cf000fce930cbb3c7 (patch) | |
tree | 32d6d140832c60ffdd9aead6db7e710cd665c212 | |
parent | 06818f7145cac51529b07f9cade5e16dabc22d29 (diff) | |
parent | 7d6a85ab5b1dc96e0f3f6f835f27bb81ba2af919 (diff) | |
download | bitcoin-f3d4dbb93991f1904a5bff4cf000fce930cbb3c7.tar.xz |
Merge pull request #6276
7d6a85a Fix getbalance * (Tom Harding)
-rw-r--r-- | src/wallet/rpcwallet.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index d284fcf15c..43fcc632f0 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; |