[backport#16144] wallet: do not encrypt wallets with disabled private keys
Summary:
wallet: do not encrypt wallets with disabled private keys (whythat)
Pull request description:
Fix for #15635. Throw an `RPC_WALLET_ENCRYPTION_FAILED` error when attempting to encrypt wallet with disabled private keys. Changed `test/function/wallet_createwallet.py` to test new behavior.
Backport of Core PR16144
Test Plan:
ninja check test_runner.py wallet_createwallet
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D7368