message: Opportunistically use bech32m change addresses if available
  If a transaction as a segwit output, use a bech32m change address if
  they are available. If not, fallback to bech32. If bech32 change
  addresses are unavailable, fallback to the default address type.
diff: @@ -1949,7 +1949,13 @@ OutputType CWallet::TransactionChangeType(const std::optional<OutputType>& chang
  int witnessversion = 0;
  std::vector<unsigned char> witnessprogram;
  if (recipient.scriptPubKey.IsWitnessProgram(witnessversion, witnessprogram)) {
  + if (GetScriptPubKeyMan(OutputType::BECH32M, true)) {
  + return OutputType::BECH32M;
  + } else if (GetScriptPubKeyMan(OutputType::BECH32, true)) {
  return OutputType::BECH32;
  + } else {
  + return m_default_address_type;
  + }
  }
  }
  