aboutsummaryrefslogtreecommitdiff
path: root/test/functional/wallet_import_rescan.py
diff options
context:
space:
mode:
authorJon Atack <jon@atack.com>2021-09-29 17:50:26 +0200
committerJon Atack <jon@atack.com>2021-09-29 22:35:43 +0200
commitd95913fc432f0fde9dec743884b14c5df83727af (patch)
tree9e0faff1860ac4e9375355805868157a926db7af /test/functional/wallet_import_rescan.py
parentefa227f5df5f5a9669dec5f1d574cf22d3c0903f (diff)
rpc: fix "trusted" description in TransactionDescriptionString
The helps for RPCs gettransaction, listtransactions, and listsinceblock returned by TransactionDescriptionString() state that the "trusted" boolean field is only present if the transaction is trusted and safe to spend from. The "trusted" boolean field is in fact returned by WalletTxToJSON() when the transaction has 0 confirmations, or negative confirmations, if conflicted, and it can be true or false. This commit updates TransactionDescriptionString() to a more accurate description for "trusted" and updates the existing line of test coverage to fail more helpfully.
Diffstat (limited to 'test/functional/wallet_import_rescan.py')
-rwxr-xr-xtest/functional/wallet_import_rescan.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/functional/wallet_import_rescan.py b/test/functional/wallet_import_rescan.py
index cbe3e9bfdd..27a2a42dac 100755
--- a/test/functional/wallet_import_rescan.py
+++ b/test/functional/wallet_import_rescan.py
@@ -99,7 +99,7 @@ class Variant(collections.namedtuple("Variant", "call data address_type rescan p
assert_equal(tx["label"], self.label)
assert_equal(tx["txid"], txid)
assert_equal(tx["confirmations"], 1 + current_height - confirmation_height)
- assert_equal("trusted" not in tx, True)
+ assert "trusted" not in tx
address, = [ad for ad in addresses if txid in ad["txids"]]
assert_equal(address["address"], self.address["address"])