diff options
author | Sjors Provoost <sjors@sprovoost.nl> | 2019-08-04 17:56:17 +0200 |
---|---|---|
committer | Sjors Provoost <sjors@sprovoost.nl> | 2021-02-23 14:34:31 +0100 |
commit | 2655197e1c2dea9536c32afe1482ced4a1f481e9 (patch) | |
tree | 05521f4f4c473073f68d6bfce518472b5b6cc0de /test/functional/wallet_signer.py | |
parent | 2700f09c4130af6167ce71f46960e92ca800e205 (diff) |
rpc: add external_signer option to createwallet
Diffstat (limited to 'test/functional/wallet_signer.py')
-rwxr-xr-x | test/functional/wallet_signer.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/test/functional/wallet_signer.py b/test/functional/wallet_signer.py index 295cdcf398..10795758e9 100755 --- a/test/functional/wallet_signer.py +++ b/test/functional/wallet_signer.py @@ -70,8 +70,15 @@ class SignerTest(BitcoinTestFramework): ) self.clear_mock_result(self.nodes[1]) - # Create new wallets with private keys disabled: - self.nodes[1].createwallet(wallet_name='hww', disable_private_keys=True, descriptors=True) + # Create new wallets for an external signer. + # disable_private_keys and descriptors must be true: + assert_raises_rpc_error(-4, "Private keys must be disabled when using an external signer", self.nodes[1].createwallet, wallet_name='not_hww', disable_private_keys=False, descriptors=True, external_signer=True) + if self.is_bdb_compiled(): + assert_raises_rpc_error(-4, "Descriptor support must be enabled when using an external signer", self.nodes[1].createwallet, wallet_name='not_hww', disable_private_keys=True, descriptors=False, external_signer=True) + else: + assert_raises_rpc_error(-4, "Compiled without bdb support (required for legacy wallets)", self.nodes[1].createwallet, wallet_name='not_hww', disable_private_keys=True, descriptors=False, external_signer=True) + + self.nodes[1].createwallet(wallet_name='hww', disable_private_keys=True, descriptors=True, external_signer=True) hww = self.nodes[1].get_wallet_rpc('hww') result = hww.enumeratesigners() |