Create a wallet as follows:

```sh
$ bitcoin-cli createwallet "watchonly" true
$ bitcoin-cli -rpcwallet=watchonly getwalletinfo
{
   ...
   "private_keys_enabled": false
}
```

The following should fail, but doesn't:

```sh
$ bitcoin-cli -rpcwallet=watchonly encryptwallet 1234
wallet 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.  
},
                RPCResults{},
                RPCExamples{
                    HelpExampleCli("walletpassphrasechange", "\"old one\" \"new one\"")
            + HelpExampleRpc("walletpassphrasechange", "\"old one\", \"new one\"")
                },
            }.ToString());
    }
    auto locked_chain = pwallet->chain().lock();
    LOCK(pwallet->cs_wallet);
    if (!pwallet->IsCrypted()) {
        throw JSONRPCError(RPC_WALLET_WRONG_ENC_STATE, "Error: running with an unencrypted wallet, but walletpassphrasechange was called.");
    }
    
    
    SecureString strOldWalletPass;
    strOldWalletPass.reserve(100);
    strOldWalletPass = request.params[0].get_str().c_str();
    SecureString strNewWalletPass;
    strNewWalletPass.reserve(100);
    strNewWalletPass = request.params[1].get_str().c_str();
    if (strOldWalletPass.empty() || strNewWalletPass.empty()) {
        throw JSONRPCError(RPC_INVALID_PARAMETER, "passphrase can not be empty");
    }
    if (!pwallet->ChangeWalletPassphrase(strOldWalletPass, strNewWalletPass)) {
        throw JSONRPCError(RPC_WALLET_PASSPHRASE_INCORRECT, "Error: The wallet passphrase entered was incorrect.");
    }
    return NullUniValue;
}
static UniValue walletlock(const JSONRPCRequest& request)