Create a wallet as follows:
0$ bitcoin-cli createwallet "watchonly" true
1$ bitcoin-cli -rpcwallet=watchonly getwalletinfo
2{
3 ...
4 "private_keys_enabled": false
5}
The following should fail, but doesn’t:
0$ bitcoin-cli -rpcwallet=watchonly encryptwallet 1234
1wallet encrypted; The keypool has been flushed and a new HD seed was generated (if you are using HD). You need to make a new backup.
It partially fails silently, because it doesn’t actually add a seed. But it does ask for a password when calling dumpwallet
, which doesn’t make sense because we currently don’t encrypt anything other than private keys.