Skip to content

Commit 645a865

Browse files
committed
rpc: remove deprecated getaddressinfo label field
1 parent b1b1739 commit 645a865

File tree

3 files changed

+1
-53
lines changed

3 files changed

+1
-53
lines changed

src/wallet/rpcwallet.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3746,7 +3746,6 @@ UniValue getaddressinfo(const JSONRPCRequest& request)
37463746
"hdseedid) and relation to the wallet (ismine, iswatchonly)."},
37473747
}},
37483748
{RPCResult::Type::BOOL, "iscompressed", /* optional */ true, "If the pubkey is compressed."},
3749-
{RPCResult::Type::STR, "label", "DEPRECATED. The label associated with the address. Defaults to \"\". Replaced by the labels array below."},
37503749
{RPCResult::Type::NUM_TIME, "timestamp", /* optional */ true, "The creation time of the key, if available, expressed in " + UNIX_EPOCH_TIME + "."},
37513750
{RPCResult::Type::STR, "hdkeypath", /* optional */ true, "The HD keypath, if the key is HD and available."},
37523751
{RPCResult::Type::STR_HEX, "hdseedid", /* optional */ true, "The Hash160 of the HD seed."},
@@ -3801,14 +3800,6 @@ UniValue getaddressinfo(const JSONRPCRequest& request)
38013800
UniValue detail = DescribeWalletAddress(pwallet, dest);
38023801
ret.pushKVs(detail);
38033802

3804-
// DEPRECATED: Return label field if existing. Currently only one label can
3805-
// be associated with an address, so the label should be equivalent to the
3806-
// value of the name key/value pair in the labels array below.
3807-
const auto* address_book_entry = pwallet->FindAddressBookEntry(dest);
3808-
if (pwallet->chain().rpcEnableDeprecated("label") && address_book_entry) {
3809-
ret.pushKV("label", address_book_entry->GetLabel());
3810-
}
3811-
38123803
ret.pushKV("ischange", pwallet->IsChange(scriptPubKey));
38133804

38143805
ScriptPubKeyMan* spk_man = pwallet->GetScriptPubKeyMan(scriptPubKey);
@@ -3829,6 +3820,7 @@ UniValue getaddressinfo(const JSONRPCRequest& request)
38293820
// stable if we allow multiple labels to be associated with an address in
38303821
// the future.
38313822
UniValue labels(UniValue::VARR);
3823+
const auto* address_book_entry = pwallet->FindAddressBookEntry(dest);
38323824
if (address_book_entry) {
38333825
// DEPRECATED: The previous behavior of returning an array containing a
38343826
// JSON object of `name` and `purpose` key/value pairs is deprecated.

test/functional/rpc_getaddressinfo_label_deprecation.py

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

test/functional/test_runner.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,6 @@
241241
'feature_blocksdir.py',
242242
'feature_config_args.py',
243243
'rpc_getaddressinfo_labels_purpose_deprecation.py',
244-
'rpc_getaddressinfo_label_deprecation.py',
245244
'rpc_getdescriptorinfo.py',
246245
'rpc_help.py',
247246
'feature_help.py',

0 commit comments

Comments
 (0)