Skip to content

Commit 0b48f77

Browse files
committed
Merge bitcoin/bitcoin#31413: rpc: Remove deprecated dummy alias for listtransactions::label
fa8e095 rpc: Remove deprecated dummy alias for listtransactions::label (MarcoFalke) Pull request description: The RPC arg is not a dummy, but a label, so offering an undocumented alias is inconsistent with all other label interfaces and confusing at best, if not entirely unused. Fix it by removing the deprecated alias. This pull is a breaking change, but it should be limited, because it only affects someone using the deprecated named arg on this RPC. I can't imagine anyone doing this, because in all other places where label args are accepted, they are called `label`. If someone really didn't use `label` here as named arg, it would be trivial and less confusing for them to fix it up. ACKs for top commit: achow101: ACK fa8e095 rkrux: tACK fa8e095 ryanofsky: Code review ACK fa8e095 Tree-SHA512: 0d0f3f53237ff9fac8c065b7d0a4245f5ff86efa427dbeeca711765494b7315a9d72b44751d346c76422847daf3d7ff90dbccb5ba200b089fb96128bd95da9f0
2 parents 21a0efa + fa8e095 commit 0b48f77

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/wallet/rpc/transactions.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2011-2022 The Bitcoin Core developers
1+
// Copyright (c) 2011-present The Bitcoin Core developers
22
// Distributed under the MIT software license, see the accompanying
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

@@ -444,7 +444,7 @@ RPCHelpMan listtransactions()
444444
"\nIf a label name is provided, this will return only incoming transactions paying to addresses with the specified label.\n"
445445
"\nReturns up to 'count' most recent transactions skipping the first 'from' transactions.\n",
446446
{
447-
{"label|dummy", RPCArg::Type::STR, RPCArg::Optional::OMITTED, "If set, should be a valid label name to return only incoming transactions\n"
447+
{"label", RPCArg::Type::STR, RPCArg::Optional::OMITTED, "If set, should be a valid label name to return only incoming transactions\n"
448448
"with the specified label, or \"*\" to disable filtering and return all transactions."},
449449
{"count", RPCArg::Type::NUM, RPCArg::Default{10}, "The number of transactions to return"},
450450
{"skip", RPCArg::Type::NUM, RPCArg::Default{0}, "The number of transactions to skip"},

test/functional/wallet_listtransactions.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python3
2-
# Copyright (c) 2014-2022 The Bitcoin Core developers
2+
# Copyright (c) 2014-present The Bitcoin Core developers
33
# Distributed under the MIT software license, see the accompanying
44
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
55
"""Test the listtransactions API."""
@@ -103,7 +103,6 @@ def run_test(self):
103103
txid = self.nodes[1].sendtoaddress(multisig["address"], 0.1)
104104
self.generate(self.nodes[1], 1)
105105
assert_equal(len(self.nodes[0].listtransactions(label="watchonly", include_watchonly=True)), 1)
106-
assert_equal(len(self.nodes[0].listtransactions(dummy="watchonly", include_watchonly=True)), 1)
107106
assert len(self.nodes[0].listtransactions(label="watchonly", count=100, include_watchonly=False)) == 0
108107
assert_array_result(self.nodes[0].listtransactions(label="watchonly", count=100, include_watchonly=True),
109108
{"category": "receive", "amount": Decimal("0.1")},

0 commit comments

Comments
 (0)