diff options
author | Jon Atack <jon@atack.com> | 2020-06-06 20:34:33 +0200 |
---|---|---|
committer | Jon Atack <jon@atack.com> | 2020-06-08 10:38:31 +0200 |
commit | a8507c99da10791aa69ca277128e06753942e976 (patch) | |
tree | 8c3ecdc7f72a45c55f69490a7a99ee8ffedc7f3f /src | |
parent | 645a8653c895e4fc7717e9e5ac045612b5deaa60 (diff) | |
download | bitcoin-a8507c99da10791aa69ca277128e06753942e976.tar.xz |
rpc: remove deprecated getaddressinfo `labels: purpose`
Diffstat (limited to 'src')
-rw-r--r-- | src/wallet/rpcwallet.cpp | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index a74ee58398..d1c8cb65f7 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -3753,12 +3753,7 @@ UniValue getaddressinfo(const JSONRPCRequest& request) {RPCResult::Type::ARR, "labels", "Array of labels associated with the address. Currently limited to one label but returned\n" "as an array to keep the API stable if multiple labels are enabled in the future.", { - {RPCResult::Type::STR, "label name", "The label name. Defaults to \"\"."}, - {RPCResult::Type::OBJ, "", "label data, DEPRECATED, will be removed in 0.21. To re-enable, launch bitcoind with `-deprecatedrpc=labelspurpose`", - { - {RPCResult::Type::STR, "name", "The label name. Defaults to \"\"."}, - {RPCResult::Type::STR, "purpose", "The purpose of the associated address (send or receive)."}, - }}, + {RPCResult::Type::STR, "label name", "Label name (defaults to \"\")."}, }}, } }, @@ -3822,13 +3817,7 @@ UniValue getaddressinfo(const JSONRPCRequest& request) UniValue labels(UniValue::VARR); const auto* address_book_entry = pwallet->FindAddressBookEntry(dest); if (address_book_entry) { - // 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(*address_book_entry, true)); - } else { - labels.push_back(address_book_entry->GetLabel()); - } + labels.push_back(address_book_entry->GetLabel()); } ret.pushKV("labels", std::move(labels)); |