wallet: Disallow creating legacy wallets

Remove the option to set descriptors=False when creating a wallet, and
enforce this in RPC and in CreateWallet
This commit is contained in:
Ava Chow committed 2025-04-23 12:11:56 -07:00
1 parent 6b247279b7
commit 9f04e02ffa
5 files changed
+13 -42

No files matched your search

@@ -33,11 +33,6 @@ class ListDescriptorsTest(BitcoinTestFramework):
node = self.nodes[0]
assert_raises_rpc_error(-18, 'No wallet is loaded.', node.listdescriptors)
if self.is_bdb_compiled():
self.log.info('Test that the command is not available for legacy wallets.')
node.createwallet(wallet_name='w1', descriptors=False)
assert_raises_rpc_error(-4, 'listdescriptors is not available for non-descriptor wallets', node.listdescriptors)
self.log.info('Test the command for empty descriptors wallet.')
node.createwallet(wallet_name='w2', blank=True, descriptors=True)
assert_equal(0, len(node.get_wallet_rpc('w2').listdescriptors()['descriptors']))