Skip to content

Commit a8507c9

Browse files
committed
rpc: remove deprecated getaddressinfo labels: purpose
1 parent 645a865 commit a8507c9

File tree

3 files changed

+2
-62
lines changed

3 files changed

+2
-62
lines changed

src/wallet/rpcwallet.cpp

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3753,12 +3753,7 @@ UniValue getaddressinfo(const JSONRPCRequest& request)
37533753
{RPCResult::Type::ARR, "labels", "Array of labels associated with the address. Currently limited to one label but returned\n"
37543754
"as an array to keep the API stable if multiple labels are enabled in the future.",
37553755
{
3756-
{RPCResult::Type::STR, "label name", "The label name. Defaults to \"\"."},
3757-
{RPCResult::Type::OBJ, "", "label data, DEPRECATED, will be removed in 0.21. To re-enable, launch bitcoind with `-deprecatedrpc=labelspurpose`",
3758-
{
3759-
{RPCResult::Type::STR, "name", "The label name. Defaults to \"\"."},
3760-
{RPCResult::Type::STR, "purpose", "The purpose of the associated address (send or receive)."},
3761-
}},
3756+
{RPCResult::Type::STR, "label name", "Label name (defaults to \"\")."},
37623757
}},
37633758
}
37643759
},
@@ -3822,13 +3817,7 @@ UniValue getaddressinfo(const JSONRPCRequest& request)
38223817
UniValue labels(UniValue::VARR);
38233818
const auto* address_book_entry = pwallet->FindAddressBookEntry(dest);
38243819
if (address_book_entry) {
3825-
// DEPRECATED: The previous behavior of returning an array containing a
3826-
// JSON object of `name` and `purpose` key/value pairs is deprecated.
3827-
if (pwallet->chain().rpcEnableDeprecated("labelspurpose")) {
3828-
labels.push_back(AddressBookDataToJSON(*address_book_entry, true));
3829-
} else {
3830-
labels.push_back(address_book_entry->GetLabel());
3831-
}
3820+
labels.push_back(address_book_entry->GetLabel());
38323821
}
38333822
ret.pushKV("labels", std::move(labels));
38343823

test/functional/rpc_getaddressinfo_labels_purpose_deprecation.py

Lines changed: 0 additions & 48 deletions
This file was deleted.

test/functional/test_runner.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,6 @@
240240
'p2p_permissions.py',
241241
'feature_blocksdir.py',
242242
'feature_config_args.py',
243-
'rpc_getaddressinfo_labels_purpose_deprecation.py',
244243
'rpc_getdescriptorinfo.py',
245244
'rpc_help.py',
246245
'feature_help.py',

0 commit comments

Comments
 (0)