Skip to content

Commit d99af86

Browse files
committed
test: check that listdescriptors descriptor strings are sorted
Tests the change introduced in PR bitcoin#25931 ("rpc: sort listdescriptors result", commit 5099624).
1 parent 590d206 commit d99af86

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/functional/wallet_listdescriptors.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ def run_test(self):
5252
assert item['range'] == [0, 0]
5353
assert item['timestamp'] is not None
5454

55+
self.log.info('Test that descriptor strings are returned in lexicographically sorted order.')
56+
descriptor_strings = [descriptor['desc'] for descriptor in result['descriptors']]
57+
assert_equal(descriptor_strings, sorted(descriptor_strings))
58+
5559
self.log.info('Test descriptors with hardened derivations are listed in importable form.')
5660
xprv = 'tprv8ZgxMBicQKsPeuVhWwi6wuMQGfPKi9Li5GtX35jVNknACgqe3CY4g5xgkfDDJcmtF7o1QnxWDRYw4H5P26PXq7sbcUkEqeR4fg3Kxp2tigg'
5761
xpub_acc = 'tpubDCMVLhErorrAGfApiJSJzEKwqeaf2z3NrkVMxgYQjZLzMjXMBeRw2muGNYbvaekAE8rUFLftyEar4LdrG2wXyyTJQZ26zptmeTEjPTaATts'

0 commit comments

Comments
 (0)