scripted-diff: test: remove 'descriptors=True' argument for createwallet calls

Descriptor wallets are already created by default since v23.0, but
since the recent legacy wallet removal this parameter *must* be True
(see commit 9f04e02ffa), i.e. still
passing it wouldn't contain any information for test readers
anymore. So simply drop them in the functional tests in order to
reduce code bloat.

-BEGIN VERIFY SCRIPT-
sed -i 's/, descriptors=True//g' $(git ls-files -- 'test/functional' ':(exclude)test/functional/wallet_backwards_compatibility.py')
sed -i '/descriptors=True,/d' ./test/functional/mempool_persist.py
-END VERIFY SCRIPT-
This commit is contained in:
Sebastian Falbesoner committed 2025-05-17 18:14:24 +02:00
1 parent 7710a31f0c
commit 86de8c1668
12 files changed
+53 -54

No files matched your search

+4 -4
View File
@@ -34,11 +34,11 @@ class ListDescriptorsTest(BitcoinTestFramework):
assert_raises_rpc_error(-18, 'No wallet is loaded.', node.listdescriptors)
self.log.info('Test the command for empty descriptors wallet.')
node.createwallet(wallet_name='w2', blank=True, descriptors=True)
node.createwallet(wallet_name='w2', blank=True)
assert_equal(0, len(node.get_wallet_rpc('w2').listdescriptors()['descriptors']))
self.log.info('Test the command for a default descriptors wallet.')
node.createwallet(wallet_name='w3', descriptors=True)
node.createwallet(wallet_name='w3')
result = node.get_wallet_rpc('w3').listdescriptors()
assert_equal("w3", result['wallet_name'])
assert_equal(8, len(result['descriptors']))
@@ -101,7 +101,7 @@ class ListDescriptorsTest(BitcoinTestFramework):
assert_equal(expected_private, wallet.listdescriptors(True))
self.log.info('Test list private descriptors with watch-only wallet')
node.createwallet(wallet_name='watch-only', descriptors=True, disable_private_keys=True)
node.createwallet(wallet_name='watch-only', disable_private_keys=True)
watch_only_wallet = node.get_wallet_rpc('watch-only')
watch_only_wallet.importdescriptors([{
'desc': descsum_create('wpkh(' + xpub_acc + ')'),
@@ -110,7 +110,7 @@ class ListDescriptorsTest(BitcoinTestFramework):
assert_raises_rpc_error(-4, 'Can\'t get descriptor string', watch_only_wallet.listdescriptors, True)
self.log.info('Test non-active non-range combo descriptor')
node.createwallet(wallet_name='w4', blank=True, descriptors=True)
node.createwallet(wallet_name='w4', blank=True)
wallet = node.get_wallet_rpc('w4')
wallet.importdescriptors([{
'desc': descsum_create('combo(' + node.get_deterministic_priv_key().key + ')'),