aboutsummaryrefslogtreecommitdiff
path: root/test/functional/wallet_listdescriptors.py
diff options
context:
space:
mode:
authorSebastian Falbesoner <sebastian.falbesoner@gmail.com>2022-09-22 19:28:03 +0200
committerSebastian Falbesoner <sebastian.falbesoner@gmail.com>2022-09-22 19:29:43 +0200
commitd99af861d034741649ccea396d825379e681670a (patch)
tree5595da38af38c029537bbbe3b97c6b1ba9037234 /test/functional/wallet_listdescriptors.py
parent590d20644458d136c74e1cb0eccbc535ac5edf41 (diff)
downloadbitcoin-d99af861d034741649ccea396d825379e681670a.tar.xz
test: check that `listdescriptors` descriptor strings are sorted
Tests the change introduced in PR #25931 ("rpc: sort listdescriptors result", commit 50996241f2b0eefeaab4fcd11b9730fa2dc107ae).
Diffstat (limited to 'test/functional/wallet_listdescriptors.py')
-rwxr-xr-xtest/functional/wallet_listdescriptors.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/functional/wallet_listdescriptors.py b/test/functional/wallet_listdescriptors.py
index 202ef92887..d5372f5aee 100755
--- a/test/functional/wallet_listdescriptors.py
+++ b/test/functional/wallet_listdescriptors.py
@@ -52,6 +52,10 @@ class ListDescriptorsTest(BitcoinTestFramework):
assert item['range'] == [0, 0]
assert item['timestamp'] is not None
+ self.log.info('Test that descriptor strings are returned in lexicographically sorted order.')
+ descriptor_strings = [descriptor['desc'] for descriptor in result['descriptors']]
+ assert_equal(descriptor_strings, sorted(descriptor_strings))
+
self.log.info('Test descriptors with hardened derivations are listed in importable form.')
xprv = 'tprv8ZgxMBicQKsPeuVhWwi6wuMQGfPKi9Li5GtX35jVNknACgqe3CY4g5xgkfDDJcmtF7o1QnxWDRYw4H5P26PXq7sbcUkEqeR4fg3Kxp2tigg'
xpub_acc = 'tpubDCMVLhErorrAGfApiJSJzEKwqeaf2z3NrkVMxgYQjZLzMjXMBeRw2muGNYbvaekAE8rUFLftyEar4LdrG2wXyyTJQZ26zptmeTEjPTaATts'