Skip to content

Commit fa168d7

Browse files
author
MarcoFalke
committed
rpc: Document all aliases for first arg of listtransactions
1 parent fa5b1f0 commit fa168d7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/wallet/rpcwallet.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1399,8 +1399,8 @@ UniValue listtransactions(const JSONRPCRequest& request)
13991399
"\nIf a label name is provided, this will return only incoming transactions paying to addresses with the specified label.\n"
14001400
"\nReturns up to 'count' most recent transactions skipping the first 'from' transactions.\n",
14011401
{
1402-
{"label", RPCArg::Type::STR, RPCArg::Optional::OMITTED_NAMED_ARG, "If set, should be a valid label name to return only incoming transactions\n"
1403-
" with the specified label, or \"*\" to disable filtering and return all transactions."},
1402+
{"label|dummy", RPCArg::Type::STR, RPCArg::Optional::OMITTED_NAMED_ARG, "If set, should be a valid label name to return only incoming transactions\n"
1403+
"with the specified label, or \"*\" to disable filtering and return all transactions."},
14041404
{"count", RPCArg::Type::NUM, /* default */ "10", "The number of transactions to return"},
14051405
{"skip", RPCArg::Type::NUM, /* default */ "0", "The number of transactions to skip"},
14061406
{"include_watchonly", RPCArg::Type::BOOL, /* default */ "true for watch-only wallets, otherwise false", "Include transactions to watch-only addresses (see 'importaddress')"},

test/functional/wallet_listtransactions.py

+2
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ def run_test(self):
9797
txid = self.nodes[1].sendtoaddress(multisig["address"], 0.1)
9898
self.nodes[1].generate(1)
9999
self.sync_all()
100+
assert_equal(len(self.nodes[0].listtransactions(label="watchonly", include_watchonly=True)), 1)
101+
assert_equal(len(self.nodes[0].listtransactions(dummy="watchonly", include_watchonly=True)), 1)
100102
assert len(self.nodes[0].listtransactions(label="watchonly", count=100, include_watchonly=False)) == 0
101103
assert_array_result(self.nodes[0].listtransactions(label="watchonly", count=100, include_watchonly=True),
102104
{"category": "receive", "amount": Decimal("0.1")},

0 commit comments

Comments
 (0)