Skip to content

Commit facfb41

Browse files
author
MarcoFalke
committed
rpc: Deprecate getunconfirmedbalance and getwalletinfo balances
1 parent 999931c commit facfb41

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

doc/release-notes.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,15 @@ platform.
6161
Notable changes
6262
===============
6363

64+
New RPCs
65+
--------
66+
67+
- `getbalances` returns an object with all balances (`mine`,
68+
`untrusted_pending` and `immature`). Please refer to the RPC help of
69+
`getbalances` for details. The new RPC is intended to replace
70+
`getunconfirmedbalance` and the balance fields in `getwalletinfo`, as well as
71+
`getbalance`. The old calls may be removed in a future version.
72+
6473
Updated RPCs
6574
------------
6675

src/wallet/rpcwallet.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,7 @@ static UniValue getunconfirmedbalance(const JSONRPCRequest &request)
785785
if (request.fHelp || request.params.size() > 0)
786786
throw std::runtime_error(
787787
RPCHelpMan{"getunconfirmedbalance",
788-
"Returns the server's total unconfirmed balance\n",
788+
"DEPRECATED\nIdentical to getbalances().mine.untrusted_pending\n",
789789
{},
790790
RPCResults{},
791791
RPCExamples{""},
@@ -2451,9 +2451,9 @@ static UniValue getwalletinfo(const JSONRPCRequest& request)
24512451
"{\n"
24522452
" \"walletname\": xxxxx, (string) the wallet name\n"
24532453
" \"walletversion\": xxxxx, (numeric) the wallet version\n"
2454-
" \"balance\": xxxxxxx, (numeric) Identical to getbalances().mine.trusted\n"
2455-
" \"unconfirmed_balance\": xxx, (numeric) Identical to getbalances().mine.untrusted_pending\n"
2456-
" \"immature_balance\": xxxxxx, (numeric) Identical to getbalances().mine.immature\n"
2454+
" \"balance\": xxxxxxx, (numeric) DEPRECATED. Identical to getbalances().mine.trusted\n"
2455+
" \"unconfirmed_balance\": xxx, (numeric) DEPRECATED. Identical to getbalances().mine.untrusted_pending\n"
2456+
" \"immature_balance\": xxxxxx, (numeric) DEPRECATED. Identical to getbalances().mine.immature\n"
24572457
" \"txcount\": xxxxxxx, (numeric) the total number of transactions in the wallet\n"
24582458
" \"keypoololdest\": xxxxxx, (numeric) the timestamp (seconds since Unix epoch) of the oldest pre-generated key in the key pool\n"
24592459
" \"keypoolsize\": xxxx, (numeric) how many new keys are pre-generated (only counts external keys)\n"

0 commit comments

Comments
 (0)