diff --git a/modules/chain/dap_chain.c b/modules/chain/dap_chain.c index d79f4448ca5cb97ff446c6383eed17f666531402..0bf5ca47a6c9c7a182e61870deb53c57e5bdaebf 100644 --- a/modules/chain/dap_chain.c +++ b/modules/chain/dap_chain.c @@ -388,9 +388,9 @@ dap_chain_t *dap_chain_load_from_cfg(const char *a_chain_net_name, dap_chain_net log_it (L_NOTICE, "Consensus initialized for chain id 0x%016"DAP_UINT64_FORMAT_x, l_chain_id.uint64); - if ( dap_config_get_item_path_default(l_cfg , "files","storage_dir",NULL ) ) + if ( dap_config_get_item_str_default(l_cfg, "files","storage_dir", NULL) ) { - DAP_CHAIN_PVT(l_chain)->file_storage_dir = dap_strdup( dap_config_get_item_path( l_cfg , "files","storage_dir" ) ); + DAP_CHAIN_PVT(l_chain)->file_storage_dir = dap_strdup((char*)dap_config_get_item_path( l_cfg , "files","storage_dir" )); } else log_it (L_INFO, "Not set file storage path, will not stored in files"); diff --git a/modules/net/dap_chain_net_node_list.c b/modules/net/dap_chain_net_node_list.c index a6a280d1e8b0520be6121a36c8e5d16f9a6ab0b3..2320071f16ed66ee1fac1c58768660d0e60d8beb 100644 --- a/modules/net/dap_chain_net_node_list.c +++ b/modules/net/dap_chain_net_node_list.c @@ -275,9 +275,9 @@ static void s_node_list_callback_notify(dap_store_obj_t *a_obj, void *a_arg) char l_ts[128] = { '\0' }; dap_gbd_time_to_str_rfc822(l_ts, sizeof(l_ts), a_obj->timestamp); - log_it(L_MSG, "Add node "NODE_ADDR_FP_STR" %s %s, pinned by "NODE_ADDR_FP_STR" at %s", + log_it(L_MSG, "Add node "NODE_ADDR_FP_STR" %s %u, pinned by "NODE_ADDR_FP_STR" at %s", NODE_ADDR_FP_ARGS_S(l_node_info->hdr.address), - l_node_ipv4_str, dap_itoa(l_node_info->hdr.ext_port), + l_node_ipv4_str, l_node_info->hdr.ext_port, NODE_ADDR_FP_ARGS_S(l_node_info->info.owner_addr), l_ts); } diff --git a/modules/net/dap_chain_node_cli_cmd.c b/modules/net/dap_chain_node_cli_cmd.c index 4e7fa1e8c6b61ca008e8969e70c1ab15ec73b123..9aa0b80cb9c3ea91102a3ba50452bc4e855ff115 100644 --- a/modules/net/dap_chain_node_cli_cmd.c +++ b/modules/net/dap_chain_node_cli_cmd.c @@ -503,9 +503,10 @@ static int node_info_dump_with_reply(dap_chain_net_t * a_net, dap_chain_node_add char l_ts[128] = { '\0' }; dap_gbd_time_to_str_rfc822(l_ts, sizeof(l_ts), l_objs[i].timestamp); - dap_string_append_printf(l_string_reply, NODE_ADDR_FP_STR" %-20s%-8s %-32s\n", + dap_string_append_printf(l_string_reply, NODE_ADDR_FP_STR" %-20s%-8d"NODE_ADDR_FP_STR" %-32s\n", NODE_ADDR_FP_ARGS_S(l_node_info->hdr.address), - l_node_ipv4_str, dap_itoa(l_node_info->hdr.ext_port), + l_node_ipv4_str, l_node_info->hdr.ext_port, + NODE_ADDR_FP_ARGS_S(l_node_info->info.owner_addr), l_ts); // get aliases in form of string @@ -1583,7 +1584,7 @@ int com_node(int a_argc, char ** a_argv, void **a_str_reply) for(dap_list_t *ll = l_net->pub.link_list; ll; ll = ll->next) { dap_chain_node_info_t *l_node_link = (dap_chain_node_info_t*)ll->data; - dap_string_append_printf(l_string_balanc, "node address "NODE_ADDR_FP_STR" \tipv4 %s \tnumber of links %u\n", + dap_string_append_printf(l_string_balanc, NODE_ADDR_FP_STR" %-20s%u\n", NODE_ADDR_FP_ARGS_S(l_node_link->hdr.address), inet_ntoa(l_node_link->hdr.ext_addr_v4), l_node_link->info.links_number); diff --git a/modules/service/stake/dap_chain_net_srv_stake_lock.c b/modules/service/stake/dap_chain_net_srv_stake_lock.c index 4d1fae52e1a61df8d1435f543a717793489dd3e8..bd1fd409b111b0cfc3ec75496c6804cfc65cbd73 100644 --- a/modules/service/stake/dap_chain_net_srv_stake_lock.c +++ b/modules/service/stake/dap_chain_net_srv_stake_lock.c @@ -833,8 +833,7 @@ static char *s_update_date_by_using_month_count(char *time, uint8_t month_count) { uint8_t current_month; int current_year; - const char *month_str; - const char *year_str; + const char *month_str, *year_str; if (!time || !month_count) return NULL;