From d69045e291e32e02d105d1b5ff1c8b86db0ae69e Mon Sep 17 00:00:00 2001 From: furszy Date: Wed, 22 Jun 2022 12:46:43 -0300 Subject: [PATCH] test: add coverage for 'listreceivedbyaddress' no change addrs return --- test/functional/wallet_listreceivedby.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/functional/wallet_listreceivedby.py b/test/functional/wallet_listreceivedby.py index db1d8eb54ae..7ae3a40eaf3 100755 --- a/test/functional/wallet_listreceivedby.py +++ b/test/functional/wallet_listreceivedby.py @@ -57,6 +57,11 @@ class ReceivedByTest(BitcoinTestFramework): {"address": empty_addr}, {"address": empty_addr, "label": "", "amount": 0, "confirmations": 0, "txids": []}) + # No returned addy should be a change addr + for node in self.nodes: + for addr_obj in node.listreceivedbyaddress(): + assert_equal(node.getaddressinfo(addr_obj["address"])["ischange"], False) + # Test Address filtering # Only on addr expected = {"address": addr, "label": "", "amount": Decimal("0.1"), "confirmations": 10, "txids": [txid, ]}