From 7b3f70e947e391e64f7241b26a3911ddffb134f4 Mon Sep 17 00:00:00 2001 From: "Dmitriy A. Gerasimov" <dmitriy.gerasimov@demlabs.net> Date: Mon, 4 Jan 2021 20:25:20 +0700 Subject: [PATCH] [*] Fixes some with blocks and cmd --- CMakeLists.txt | 2 +- modules/net/dap_chain_node_cli_cmd.c | 2 +- modules/type/blocks/dap_chain_cs_blocks.c | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4a722950af..aa1b015182 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ project(cellframe-sdk C) cmake_minimum_required(VERSION 2.8) set(CMAKE_C_STANDARD 11) -set(CELLFRAME_SDK_NATIVE_VERSION "2.6-96") +set(CELLFRAME_SDK_NATIVE_VERSION "2.6-97") add_definitions ("-DCELLFRAME_SDK_VERSION=\"${CELLFRAME_SDK_NATIVE_VERSION}\"") set(DAPSDK_MODULES "") diff --git a/modules/net/dap_chain_node_cli_cmd.c b/modules/net/dap_chain_node_cli_cmd.c index aaf69fdca9..64643ebb41 100644 --- a/modules/net/dap_chain_node_cli_cmd.c +++ b/modules/net/dap_chain_node_cli_cmd.c @@ -2278,7 +2278,7 @@ int com_mempool_proc(int argc, char ** argv, void *arg_func, char ** a_str_reply char buf[50]; time_t l_ts_create = (time_t) l_datum->header.ts_create; const char *l_type = NULL; - DATUM_TYPE_STR(l_datum->header.type_id, l_type) + DAP_DATUM_TYPE_STR(l_datum->header.type_id, l_type); dap_string_append_printf(l_str_tmp, "hash %s: type_id=%s ts_create=%s data_size=%u\n", l_datum_hash_out_str, l_type, dap_ctime_r(&l_ts_create, buf), l_datum->header.data_size); diff --git a/modules/type/blocks/dap_chain_cs_blocks.c b/modules/type/blocks/dap_chain_cs_blocks.c index 969588af0d..0648b02f63 100644 --- a/modules/type/blocks/dap_chain_cs_blocks.c +++ b/modules/type/blocks/dap_chain_cs_blocks.c @@ -513,7 +513,9 @@ static int s_cli_blocks(int a_argc, char ** a_argv, void *a_arg_func, char **a_s time_t l_datum_ts_create = (time_t) l_datum->header.ts_create; // Nested datums dap_string_append_printf(l_str_tmp,"\t\t\t\tversion:=0x%02X\n", l_datum->header.version_id); - dap_string_append_printf(l_str_tmp,"\t\t\t\ttype_id:=%s\n", c_datum_type_str[l_datum->header.type_id]); + const char * l_datum_type_str="UNKNOWN"; + DAP_DATUM_TYPE_STR(l_datum->header.type_id, l_datum_type_str); + dap_string_append_printf(l_str_tmp,"\t\t\t\ttype_id:=%s\n", l_datum_type_str); dap_string_append_printf(l_str_tmp,"\t\t\t\tts_create=%s\n",ctime_r( &l_datum_ts_create,buf )); dap_string_append_printf(l_str_tmp,"\t\t\t\tdata_size=%u\n", l_datum->header.data_size); dap_chain_net_dump_datum(l_str_tmp, l_datum, "hex" ); -- GitLab