Skip to content

Commit

Permalink
rpc: Deprecate getunconfirmedbalance and getwalletinfo balances
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoFalke committed May 3, 2019
1 parent 999931c commit facfb41
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
9 changes: 9 additions & 0 deletions doc/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,15 @@ platform.
Notable changes
===============

New RPCs
--------

- `getbalances` returns an object with all balances (`mine`,
`untrusted_pending` and `immature`). Please refer to the RPC help of
`getbalances` for details. The new RPC is intended to replace
`getunconfirmedbalance` and the balance fields in `getwalletinfo`, as well as
`getbalance`. The old calls may be removed in a future version.

Updated RPCs
------------

Expand Down
8 changes: 4 additions & 4 deletions src/wallet/rpcwallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ static UniValue getunconfirmedbalance(const JSONRPCRequest &request)
if (request.fHelp || request.params.size() > 0)
throw std::runtime_error(
RPCHelpMan{"getunconfirmedbalance",
"Returns the server's total unconfirmed balance\n",
"DEPRECATED\nIdentical to getbalances().mine.untrusted_pending\n",
{},
RPCResults{},
RPCExamples{""},
Expand Down Expand Up @@ -2451,9 +2451,9 @@ static UniValue getwalletinfo(const JSONRPCRequest& request)
"{\n"
" \"walletname\": xxxxx, (string) the wallet name\n"
" \"walletversion\": xxxxx, (numeric) the wallet version\n"
" \"balance\": xxxxxxx, (numeric) Identical to getbalances().mine.trusted\n"
" \"unconfirmed_balance\": xxx, (numeric) Identical to getbalances().mine.untrusted_pending\n"
" \"immature_balance\": xxxxxx, (numeric) Identical to getbalances().mine.immature\n"
" \"balance\": xxxxxxx, (numeric) DEPRECATED. Identical to getbalances().mine.trusted\n"
" \"unconfirmed_balance\": xxx, (numeric) DEPRECATED. Identical to getbalances().mine.untrusted_pending\n"
" \"immature_balance\": xxxxxx, (numeric) DEPRECATED. Identical to getbalances().mine.immature\n"
" \"txcount\": xxxxxxx, (numeric) the total number of transactions in the wallet\n"
" \"keypoololdest\": xxxxxx, (numeric) the timestamp (seconds since Unix epoch) of the oldest pre-generated key in the key pool\n"
" \"keypoolsize\": xxxx, (numeric) how many new keys are pre-generated (only counts external keys)\n"
Expand Down

0 comments on commit facfb41

Please sign in to comment.