mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-26 19:23:26 -03:00
[wallet] [rpc] print wallet name in getwalletinfo
This commit is contained in:
parent
09eacee6b2
commit
4a057152d2
1 changed files with 2 additions and 0 deletions
|
@ -2447,6 +2447,7 @@ UniValue getwalletinfo(const JSONRPCRequest& request)
|
||||||
"Returns an object containing various wallet state info.\n"
|
"Returns an object containing various wallet state info.\n"
|
||||||
"\nResult:\n"
|
"\nResult:\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
|
" \"walletname\": xxxxx, (string) the wallet name\n"
|
||||||
" \"walletversion\": xxxxx, (numeric) the wallet version\n"
|
" \"walletversion\": xxxxx, (numeric) the wallet version\n"
|
||||||
" \"balance\": xxxxxxx, (numeric) the total confirmed balance of the wallet in " + CURRENCY_UNIT + "\n"
|
" \"balance\": xxxxxxx, (numeric) the total confirmed balance of the wallet in " + CURRENCY_UNIT + "\n"
|
||||||
" \"unconfirmed_balance\": xxx, (numeric) the total unconfirmed balance of the wallet in " + CURRENCY_UNIT + "\n"
|
" \"unconfirmed_balance\": xxx, (numeric) the total unconfirmed balance of the wallet in " + CURRENCY_UNIT + "\n"
|
||||||
|
@ -2469,6 +2470,7 @@ UniValue getwalletinfo(const JSONRPCRequest& request)
|
||||||
UniValue obj(UniValue::VOBJ);
|
UniValue obj(UniValue::VOBJ);
|
||||||
|
|
||||||
size_t kpExternalSize = pwallet->KeypoolCountExternalKeys();
|
size_t kpExternalSize = pwallet->KeypoolCountExternalKeys();
|
||||||
|
obj.push_back(Pair("walletname", pwallet->GetName()));
|
||||||
obj.push_back(Pair("walletversion", pwallet->GetVersion()));
|
obj.push_back(Pair("walletversion", pwallet->GetVersion()));
|
||||||
obj.push_back(Pair("balance", ValueFromAmount(pwallet->GetBalance())));
|
obj.push_back(Pair("balance", ValueFromAmount(pwallet->GetBalance())));
|
||||||
obj.push_back(Pair("unconfirmed_balance", ValueFromAmount(pwallet->GetUnconfirmedBalance())));
|
obj.push_back(Pair("unconfirmed_balance", ValueFromAmount(pwallet->GetUnconfirmedBalance())));
|
||||||
|
|
Loading…
Add table
Reference in a new issue