diff --git a/dap_chain_node_cli.c b/dap_chain_node_cli.c index ac76fb398c50818f2f1da55a230481c8b384aa97..50ed9e2bbd0aa4082f749909ea9ceb9257412d24 100644 --- a/dap_chain_node_cli.c +++ b/dap_chain_node_cli.c @@ -461,7 +461,7 @@ int dap_chain_node_cli_init(dap_config_t * g_config) "global_db node dump -net <net name> -addr <node address> | -alias <node alias>\n\n" "global_db node cur_node get -net <net name>\n\n" "global_db node cur_node_set -net <net name> -addr <node address> | -alias <node alias>\n\n" - "global_db node remote_set -addr <node address> | -alias <node alias>\n"); + "global_db node cur_node_set_from_remote -addr <node address> | -alias <node alias>\n"); dap_chain_node_cli_cmd_item_create ("node", com_node, "Work with node", "node alias {<node address> | -alias <node alias>}\n\n" "node connect {<node address> | -alias <node alias>}\n\n" diff --git a/dap_chain_node_cli_cmd.c b/dap_chain_node_cli_cmd.c index ae272db1b9840afa73d842c4c86d2887d128aae3..6dc3bc67578564a82ce29973a5118374f276eaf3 100644 --- a/dap_chain_node_cli_cmd.c +++ b/dap_chain_node_cli_cmd.c @@ -594,7 +594,7 @@ static int com_global_db_cur_node_set(dap_chain_node_info_t *a_node_info, const * str_reply[out] for reply * return 0 Ok, -1 error */ -static int com_global_db_set_remote(dap_chain_node_info_t *a_node_info, const char *a_alias_str, char **a_str_reply) +static int com_global_db_cur_node_set_from_remote(dap_chain_node_info_t *a_node_info, const char *a_alias_str, char **a_str_reply) { if(!a_node_info->hdr.address.uint64 && !a_alias_str) { dap_chain_node_cli_set_reply_text(a_str_reply, "addr not found"); @@ -694,7 +694,7 @@ static int com_global_db_set_remote(dap_chain_node_info_t *a_node_info, const ch int com_global_db(int argc, const char ** argv, char **str_reply) { enum { - CMD_NONE, CMD_ADD, CMD_DEL, CMD_LINK, CMD_DUMP, CMD_CUR_NODE_GET, CMD_CUR_NODE_SET, CMD_REMOTE_SET + CMD_NONE, CMD_ADD, CMD_DEL, CMD_LINK, CMD_DUMP, CMD_CUR_NODE_GET, CMD_CUR_NODE_SET, CMD_CUR_NODE_SET_FROM_REMOTE }; //printf("com_global_db\n"); int arg_index = 1; @@ -731,7 +731,7 @@ int com_global_db(int argc, const char ** argv, char **str_reply) } else if((arg_index_n = dap_chain_node_cli_find_option_val(argv, arg_index, min(argc, arg_index + 1), "remote_set", NULL)) != 0) { - cmd_num = CMD_REMOTE_SET; + cmd_num = CMD_CUR_NODE_SET_FROM_REMOTE; } if(cmd_num == CMD_NONE) { dap_chain_node_cli_set_reply_text(str_reply, "command %s not recognized", argv[1]); @@ -803,9 +803,9 @@ int com_global_db(int argc, const char ** argv, char **str_reply) case CMD_CUR_NODE_SET: // handler of command 'global_db cur_node set' return com_global_db_cur_node_set(l_node_info, alias_str, str_reply); - case CMD_REMOTE_SET: + case CMD_CUR_NODE_SET_FROM_REMOTE: // handler of command 'global_db node remote_set' - return com_global_db_set_remote(l_node_info, alias_str, str_reply); + return com_global_db_cur_node_set_from_remote(l_node_info, alias_str, str_reply); default: dap_chain_node_cli_set_reply_text(str_reply, "command %s not recognized", argv[1]);