From 89306ab0df93bfdf5630910bc20b1eccb7379172 Mon Sep 17 00:00:00 2001 From: Russell Yanofsky Date: Sat, 6 Oct 2018 00:48:23 -0400 Subject: [wallet] Restore ability to list incoming transactions by label Backport of PR 14411 to v0.17. This change partially reverts #13075 and #14023. Fixes #14382 --- test/functional/wallet_listtransactions.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'test/functional/wallet_listtransactions.py') diff --git a/test/functional/wallet_listtransactions.py b/test/functional/wallet_listtransactions.py index 4dc3ff4b26..b0449f1aa4 100755 --- a/test/functional/wallet_listtransactions.py +++ b/test/functional/wallet_listtransactions.py @@ -94,9 +94,10 @@ class ListTransactionsTest(BitcoinTestFramework): txid = self.nodes[1].sendtoaddress(multisig["address"], 0.1) self.nodes[1].generate(1) self.sync_all() - assert not [tx for tx in self.nodes[0].listtransactions(dummy="*", count=100, skip=0, include_watchonly=False) if "label" in tx and tx["label"] == "watchonly"] - txs = [tx for tx in self.nodes[0].listtransactions(dummy="*", count=100, skip=0, include_watchonly=True) if "label" in tx and tx['label'] == 'watchonly'] - assert_array_result(txs, {"category": "receive", "amount": Decimal("0.1")}, {"txid": txid}) + assert len(self.nodes[0].listtransactions(label="watchonly", count=100, skip=0, include_watchonly=False)) == 0 + assert_array_result(self.nodes[0].listtransactions(label="watchonly", count=100, skip=0, include_watchonly=True), + {"category": "receive", "amount": Decimal("0.1")}, + {"txid": txid, "label": "watchonly"}) self.run_rbf_opt_in_test() -- cgit v1.2.3