accelerator/core/periodical_task.c
static status_t ta_update_full_node_connection(ta_config_t* const ta_conf, iota_client_service_t* const service) {
  status_t ret = SC_OK;
  for (int i = 0; i < MAX_NODE_LIST_ELEMENTS && ta_conf->iota_host_list[i]; i++) {
    // update new IOTA full node

    strncpy(service->http.host, ta_conf->iota_host_list[i], HOST_MAX_LEN - 1);
    service->http.port = ta_conf->iota_port_list[i];
    ta_log_info("Try to connect to %s:%d\n", service->http.host, service->http.port);

    // Run from the first one until found a good one.
    if (ta_get_node_status(service) == SC_OK) {
      ta_log_info("Connect to %s:%d\n", service->http.host, service->http.port);
      goto done;
    }
  }
  if (ret) {
    ta_log_error("All IOTA full node on priority list failed.\n");
  }

done:
  return ret;
}
/**
 * @brief Update the binding IOTA full node to another valid host on priority list
 *
 * ta_update_full_node_connection would check the connection status of all the IOTA full node on priority list
 * iteratively. Once it connects to one of the IOTA full node on the priority list, it would return SC_OK.
 *
 * @param[in] ta_conf Tangle-accelerator configuration variables
 * @param[in] service service IOTA full node endpoint service
 *
 * @return
 * - SC_OK on success
 * - non-zero on error
 */
@brief Update the binding IOTA full node to another valid host on priority list
ta_update_full_node_connection would check the connection status of all the IOTA full node on priority list
iteratively. Once it connects to one of the IOTA full node on the priority list, it would return SC_OK.

@param[in] ta_conf Tangle-accelerator configuration variables
@param[in] service service IOTA full node endpoint service

@return
- SC_OK on success
- non-zero on error
@brief Update the binding IOTA full node to another valid host on priority list ta_update_full_node_connection would check the connection status of all the IOTA full node on priority list iteratively . Once it connects to one of the IOTA full node on the priority list it would return SC_OK . @param [ in ] ta_conf Tangle - accelerator configuration variables @param [ in ] service service IOTA full node endpoint service @return - SC_OK on success - non - zero on error
static status_t ta_update_full_node_connection(ta_config_t* const ta_conf, iota_client_service_t* const service) {
  status_t ret = SC_OK;
  for (int i = 0; i < MAX_NODE_LIST_ELEMENTS && ta_conf->iota_host_list[i]; i++) {
    strncpy(service->http.host, ta_conf->iota_host_list[i], HOST_MAX_LEN - 1);
    service->http.port = ta_conf->iota_port_list[i];
    ta_log_info("Try to connect to %s:%d\n", service->http.host, service->http.port);
    if (ta_get_node_status(service) == SC_OK) {
      ta_log_info("Connect to %s:%d\n", service->http.host, service->http.port);
      goto done;
    }
  }
  if (ret) {
    ta_log_error("All IOTA full node on priority list failed.\n");
  }
done:
  return ret;
}
static status_t ta_update_full_node_connection ( ta_config_t * const ta_conf , iota_client_service_t * const service ) { status_t ret = SC_OK ; for ( int i = 0 ; i < MAX_NODE_LIST_ELEMENTS && ta_conf -> iota_host_list [ i ] ; i ++ ) { strncpy ( service -> http . host , ta_conf -> iota_host_list [ i ] , HOST_MAX_LEN - 1 ) ; service -> http . port = ta_conf -> iota_port_list [ i ] ; ta_log_info ( " \n " , service -> http . host , service -> http . port ) ; if ( ta_get_node_status ( service ) == SC_OK ) { ta_log_info ( " \n " , service -> http . host , service -> http . port ) ; goto done ; } } if ( ret ) { ta_log_error ( " \n " ) ; } done : return ret ; }
@brief Update the binding IOTA full node to another valid host on priority list
 ta_update_full_node_connection would check the connection status of all the IOTA full node on priority list
 iteratively.
@brief Update the binding IOTA full node to another valid host on priority list ta_update_full_node_connection would check the connection status of all the IOTA full node on priority list iteratively .
// update new IOTA full node // Run from the first one until found a good one.