mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-02 09:46:52 -05:00
doc: address pr17578 review feedback
- https://github.com/bitcoin/bitcoin/pull/17578#discussion_r363975411 - https://github.com/bitcoin/bitcoin/pull/17578#discussion_r363969721 - https://github.com/bitcoin/bitcoin/pull/17578#discussion_r362703553
This commit is contained in:
parent
6196e93001
commit
c7654af6f8
3 changed files with 5 additions and 6 deletions
|
@ -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`.
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue