diff options
author | w0xlt <94266259+w0xlt@users.noreply.github.com> | 2022-04-15 19:23:26 -0300 |
---|---|---|
committer | w0xlt <94266259+w0xlt@users.noreply.github.com> | 2022-04-16 04:46:22 -0300 |
commit | 6f29409ad180ef00998ac05997f0fa03f98cd066 (patch) | |
tree | 1227b269348bf0bcbe7a95abaa3103f22bd4306a /test | |
parent | 0359d9b6a3808e70af6e19b85d13371eb0434ce5 (diff) |
test: Add a test that creates a wallet with invalid parameters
Invalid parameters must not prevent a new wallet with the same name
from being created with the correct parameters
Diffstat (limited to 'test')
-rwxr-xr-x | test/functional/wallet_createwallet.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/functional/wallet_createwallet.py b/test/functional/wallet_createwallet.py index e8234de032..dcf2e98638 100755 --- a/test/functional/wallet_createwallet.py +++ b/test/functional/wallet_createwallet.py @@ -26,6 +26,11 @@ class CreateWalletTest(BitcoinTestFramework): node = self.nodes[0] self.generate(node, 1) # Leave IBD for sethdseed + self.log.info("Run createwallet with invalid parameters.") + # Run createwallet with invalid parameters. This must not prevent a new wallet with the same name from being created with the correct parameters. + assert_raises_rpc_error(-4, "Passphrase provided but private keys are disabled. A passphrase is only used to encrypt private keys, so cannot be used for wallets with private keys disabled.", + self.nodes[0].createwallet, wallet_name='w0', descriptors=True, disable_private_keys=True, passphrase="passphrase") + self.nodes[0].createwallet(wallet_name='w0') w0 = node.get_wallet_rpc('w0') address1 = w0.getnewaddress() |