Skip to content

Commit d4d70ed

Browse files
committed
Fix listreceivedbyaddress not taking address as a string
Fixes #14173. Add the patch in #14173 and include a regression test.
1 parent f504a14 commit d4d70ed

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/rpc/client.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ static const CRPCConvertParam vRPCConvertParams[] =
4545
{ "listreceivedbyaddress", 0, "minconf" },
4646
{ "listreceivedbyaddress", 1, "include_empty" },
4747
{ "listreceivedbyaddress", 2, "include_watchonly" },
48-
{ "listreceivedbyaddress", 3, "address_filter" },
4948
{ "listreceivedbylabel", 0, "minconf" },
5049
{ "listreceivedbylabel", 1, "include_empty" },
5150
{ "listreceivedbylabel", 2, "include_watchonly" },

test/functional/wallet_listreceivedby.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ def run_test(self):
6868
res = self.nodes[1].listreceivedbyaddress(minconf=0, include_empty=True, include_watchonly=True, address_filter=addr)
6969
assert_array_result(res, {"address": addr}, expected)
7070
assert_equal(len(res), 1)
71+
# Test for regression on CLI calls with address string (#14173)
72+
cli_res = self.nodes[1].cli.listreceivedbyaddress(0, True, True, addr)
73+
assert_array_result(cli_res, {"address": addr}, expected)
74+
assert_equal(len(cli_res), 1)
7175
# Error on invalid address
7276
assert_raises_rpc_error(-4, "address_filter parameter was invalid", self.nodes[1].listreceivedbyaddress, minconf=0, include_empty=True, include_watchonly=True, address_filter="bamboozling")
7377
# Another address receive money

0 commit comments

Comments
 (0)