aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Scrivner <eric.t.scrivner@gmail.com>2018-10-06 10:11:38 -0700
committerEric Scrivner <eric.t.scrivner@gmail.com>2018-10-14 09:48:06 -0700
commitd4d70eda339f6f74390b56edd4021e928bb588a7 (patch)
treee8d8ac61406ea81289a347cddf7c600cef0d5f0a
parentf504a1402afd0760e9d348ecc8bad0094aa7d705 (diff)
Fix listreceivedbyaddress not taking address as a string
Fixes #14173. Add the patch in #14173 and include a regression test.
-rw-r--r--src/rpc/client.cpp1
-rwxr-xr-xtest/functional/wallet_listreceivedby.py4
2 files changed, 4 insertions, 1 deletions
diff --git a/src/rpc/client.cpp b/src/rpc/client.cpp
index 649e222c39..2bf6aa3b76 100644
--- a/src/rpc/client.cpp
+++ b/src/rpc/client.cpp
@@ -45,7 +45,6 @@ static const CRPCConvertParam vRPCConvertParams[] =
{ "listreceivedbyaddress", 0, "minconf" },
{ "listreceivedbyaddress", 1, "include_empty" },
{ "listreceivedbyaddress", 2, "include_watchonly" },
- { "listreceivedbyaddress", 3, "address_filter" },
{ "listreceivedbylabel", 0, "minconf" },
{ "listreceivedbylabel", 1, "include_empty" },
{ "listreceivedbylabel", 2, "include_watchonly" },
diff --git a/test/functional/wallet_listreceivedby.py b/test/functional/wallet_listreceivedby.py
index 3485c4470f..9e8667c600 100755
--- a/test/functional/wallet_listreceivedby.py
+++ b/test/functional/wallet_listreceivedby.py
@@ -68,6 +68,10 @@ class ReceivedByTest(BitcoinTestFramework):
res = self.nodes[1].listreceivedbyaddress(minconf=0, include_empty=True, include_watchonly=True, address_filter=addr)
assert_array_result(res, {"address": addr}, expected)
assert_equal(len(res), 1)
+ # Test for regression on CLI calls with address string (#14173)
+ cli_res = self.nodes[1].cli.listreceivedbyaddress(0, True, True, addr)
+ assert_array_result(cli_res, {"address": addr}, expected)
+ assert_equal(len(cli_res), 1)
# Error on invalid address
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")
# Another address receive money