From ba1f128d6c117a63d5d904b3956551bd83405ec9 Mon Sep 17 00:00:00 2001 From: Fabian Jahr Date: Wed, 10 Jul 2019 17:51:39 -0400 Subject: Return error for ignored passphrase through disable private keys option --- test/functional/wallet_createwallet.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test') diff --git a/test/functional/wallet_createwallet.py b/test/functional/wallet_createwallet.py index c17949a2f6..294f90a0fa 100755 --- a/test/functional/wallet_createwallet.py +++ b/test/functional/wallet_createwallet.py @@ -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() -- cgit v1.2.3