Partial Merge #16144: wallet: do not encrypt wallets with disabled private keys
Partial Merge #16144: wallet: do not encrypt wallets with disabled private keys

7860c98bd 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.

ACKs for commit 7860c9:
  achow101:
    utACK 7860c98bd59cd8f56e9b2b4ae45265c046e7cfd9
  meshcollider:
    utACK https://github.com/bitcoin/bitcoin/pull/16144/commits/7860c98bd59cd8f56e9b2b4ae45265c046e7cfd9

Tree-SHA512: d0cc40efd303a00d0b4d3cb2de59d8d2d7dd35647e7f3fe9d4a8986589499c1f567c5780c83a129e1ab8dbe601279c459c6ebce3b48b1d81d47a28616ef4a369

dashpay/dash,UdjinM6/dash,UdjinM6/dash,UdjinM6/dash,thelazier/dash,thelazier/dash,dashpay/dash,dashpay/dash,UdjinM6/dash,thelazier/dash,thelazier/dash,UdjinM6/dash,dashpay/dash,thelazier/dash,dashpay/dash