aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorwhythat <whythat@protonmail.com>2019-06-04 13:33:39 +0300
committerwhythat <whythat@protonmail.com>2019-06-04 16:39:34 +0300
commit7860c98bd59cd8f56e9b2b4ae45265c046e7cfd9 (patch)
tree2be6410322f87ecb4f068856fb74b96c8bf09473 /test
parentd3a1c2502bb19d667c692937784fe027fd8d32da (diff)
wallet: do not encrypt wallets with disabled private keys
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/wallet_createwallet.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/functional/wallet_createwallet.py b/test/functional/wallet_createwallet.py
index fc7969ad19..c17949a2f6 100755
--- a/test/functional/wallet_createwallet.py
+++ b/test/functional/wallet_createwallet.py
@@ -92,7 +92,7 @@ class CreateWalletTest(BitcoinTestFramework):
assert_raises_rpc_error(-4, "Error: This wallet has no available keys", w5.getnewaddress)
assert_raises_rpc_error(-4, "Error: This wallet has no available keys", w5.getrawchangeaddress)
# Encrypt the wallet
- w5.encryptwallet('pass')
+ assert_raises_rpc_error(-16, "Error: wallet does not contain private keys, nothing to encrypt.", w5.encryptwallet, 'pass')
assert_raises_rpc_error(-4, "Error: This wallet has no available keys", w5.getnewaddress)
assert_raises_rpc_error(-4, "Error: This wallet has no available keys", w5.getrawchangeaddress)