Return error for ignored passphrase through disable private keys option

This commit is contained in:
Fabian Jahr authored and Fabian Jahr committed 2019-07-19 14:34:33 -04:00
1 parent d6649d16b5
commit ba1f128d6c
4 files changed
+20 -16

No files matched your search

+3
View File
@@ -119,5 +119,8 @@ class CreateWalletTest(BitcoinTestFramework):
# Empty passphrase, error
assert_raises_rpc_error(-16, 'Cannot encrypt a wallet with a blank password', self.nodes[0].createwallet, 'w7', False, False, '')
self.log.info('Using a passphrase with private keys disabled returns error')
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='w8', disable_private_keys=True, passphrase='thisisapassphrase')
if __name__ == '__main__':
CreateWalletTest().main()