Skip to content

Commit

Permalink
doc: address pr17578 review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatack authored and VanOrton committed Oct 30, 2020
1 parent 0f962ba commit 0daa05e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion doc/release-notes-17578.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ Deprecated or removed RPCs
- The `getaddressinfo` RPC `labels` field now returns an array of label name
strings. Previously, it returned an array of JSON objects containing `name` and
`purpose` key/value pairs, which is now deprecated and will be removed in
0.21. To re-enable the previous behavior, launch bitcoind with
0.21. To re-enable the previous behavior, launch with
`-deprecatedrpc=labelspurpose`.
5 changes: 2 additions & 3 deletions src/wallet/rpcwallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3843,12 +3843,11 @@ UniValue getaddressinfo(const JSONRPCRequest& request)
// associated with an address, but we return an array so the API remains
// stable if we allow multiple labels to be associated with an address in
// the future.
//
// DEPRECATED: The previous behavior of returning an array containing a JSON
// object of `name` and `purpose` key/value pairs has been deprecated.
UniValue labels(UniValue::VARR);
std::map<CTxDestination, CAddressBookData>::iterator mi = pwallet->mapAddressBook.find(dest);
if (mi != pwallet->mapAddressBook.end()) {
// DEPRECATED: The previous behavior of returning an array containing a
// JSON object of `name` and `purpose` key/value pairs is deprecated.
if (pwallet->chain().rpcEnableDeprecated("labelspurpose")) {
labels.push_back(AddressBookDataToJSON(mi->second, true));
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""
Test deprecation of RPC getaddressinfo `labels` returning an array
containing a JSON hash of `name` and purpose` key-value pairs. It now
returns an array of label names.
containing a JSON object of `name` and purpose` key-value pairs. It now
returns an array containing only the label name.
"""
from test_framework.test_framework import BitcoinTestFramework
Expand Down

0 comments on commit 0daa05e

Please sign in to comment.