aboutsummaryrefslogtreecommitdiff
path: root/src/rpcwallet.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2015-01-04 17:02:58 +0100
committerPieter Wuille <pieter.wuille@gmail.com>2015-01-04 17:06:17 +0100
commit84eba479a17a853c1df1d5bbbe674f308429a8f6 (patch)
treeab9d744d3b7f622bd0b4f2bf07273693f9d49799 /src/rpcwallet.cpp
parent9a5cabf3da21f1707c9c38891f4095862b7abe16 (diff)
parent12d927a391b83041479f06e72051d37cc4e66655 (diff)
Merge pull request #5540
12d927a RPC test for immature balance (Jonas Schnelli) 8024d67 Add immature balances to getwalletinfo. (Gregory Maxwell) d44c545 Add unconfirmedbalance field to getwalletinfo (azeteki)
Diffstat (limited to 'src/rpcwallet.cpp')
-rw-r--r--src/rpcwallet.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index 56be6dba13..af7e8221cc 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -1990,7 +1990,9 @@ Value getwalletinfo(const Array& params, bool fHelp)
"\nResult:\n"
"{\n"
" \"walletversion\": xxxxx, (numeric) the wallet version\n"
- " \"balance\": xxxxxxx, (numeric) the total bitcoin balance of the wallet\n"
+ " \"balance\": xxxxxxx, (numeric) the total confirmed bitcoin balance of the wallet\n"
+ " \"unconfirmed_balance\": xxx, (numeric) the total unconfirmed bitcoin balance of the wallet\n"
+ " \"immature_balance\": xxxxxx, (numeric) the total immature balance of the wallet\n"
" \"txcount\": xxxxxxx, (numeric) the total number of transactions in the wallet\n"
" \"keypoololdest\": xxxxxx, (numeric) the timestamp (seconds since GMT epoch) of the oldest pre-generated key in the key pool\n"
" \"keypoolsize\": xxxx, (numeric) how many new keys are pre-generated\n"
@@ -2004,6 +2006,8 @@ Value getwalletinfo(const Array& params, bool fHelp)
Object obj;
obj.push_back(Pair("walletversion", pwalletMain->GetVersion()));
obj.push_back(Pair("balance", ValueFromAmount(pwalletMain->GetBalance())));
+ obj.push_back(Pair("unconfirmed_balance", ValueFromAmount(pwalletMain->GetUnconfirmedBalance())));
+ obj.push_back(Pair("immature_balance", ValueFromAmount(pwalletMain->GetImmatureBalance())));
obj.push_back(Pair("txcount", (int)pwalletMain->mapWallet.size()));
obj.push_back(Pair("keypoololdest", pwalletMain->GetOldestKeyPoolTime()));
obj.push_back(Pair("keypoolsize", (int)pwalletMain->GetKeyPoolSize()));