message: rpc: make generatetoaddress locals const
  and named the same as in generatetodescriptor just above.
diff: @@ -304,17 +304,14 @@ static UniValue generatetoaddress(const JSONRPCRequest& request)
  },
  }.Check(request);
  + const int num_blocks{request.params[0].get_int()};
  + const uint64_t max_tries{request.params[2].isNull() ? DEFAULT_MAX_TRIES : request.params[2].get_int()};
  std::shared_ptr<CWallet> const wallet = GetWalletForJSONRPCRequest(request);
  const CWallet* const pwallet = wallet.get();
  if (!EnsureWalletIsAvailable(pwallet, request.fHelp)) {
  return NullUniValue;
  }
  - int nGenerate = request.params[0].get_int();
  - uint64_t nMaxTries{DEFAULT_MAX_TRIES};
  - if (!request.params[2].isNull()) {
  - nMaxTries = request.params[2].get_int();
  - }
  CTxDestination destination = DecodeDestination(request.params[1].get_str());
  if (!IsValidDestination(destination)) {
  @@ -326,7 +323,7 @@ static UniValue generatetoaddress(const JSONRPCRequest& request)
  CScript coinbase_script = GetScriptForDestination(destination);
  - return generateBlocks(chainman, mempool, coinbase_script, nGenerate, nMaxTries, pwallet);
  + return generateBlocks(chainman, mempool, coinbase_script, num_blocks, max_tries, pwallet);
  }
  static UniValue generateblock(const JSONRPCRequest& request)
  