diff --git a/dap-sdk b/dap-sdk index 9e7565c9417bad979e90b83ccd537aecfe7c07f9..28a6eeb1458c430cc164881c0e01184cbd2240d9 160000 --- a/dap-sdk +++ b/dap-sdk @@ -1 +1 @@ -Subproject commit 9e7565c9417bad979e90b83ccd537aecfe7c07f9 +Subproject commit 28a6eeb1458c430cc164881c0e01184cbd2240d9 diff --git a/modules/net/dap_chain_node_cli_cmd.c b/modules/net/dap_chain_node_cli_cmd.c index 3ed810d5520a9d2ababcaefd386955cc1499c234..167d74d35c5f1b91c9d65fa1ac91cbe9819c6230 100644 --- a/modules/net/dap_chain_node_cli_cmd.c +++ b/modules/net/dap_chain_node_cli_cmd.c @@ -7408,10 +7408,9 @@ int com_tx_history(int a_argc, char ** a_argv, void **a_str_reply) json_object_array_add(*json_arr_reply, json_obj_summary); return DAP_CHAIN_NODE_CLI_COM_TX_HISTORY_OK; } else if (l_is_tx_count) { - size_t t1 = l_chain->callback_count_atom(l_chain); - size_t t2 = l_chain->callback_count_tx(l_chain); - if(t1>t2) - json_object_array_add(*json_arr_reply, json_object_new_string("empty")); + json_object * json_count_obj= json_object_new_object(); + json_object_object_add(json_count_obj, "Number of transaction", json_object_new_uint64(l_chain->callback_count_tx(l_chain))); + json_object_array_add(*json_arr_reply, json_count_obj); } if (json_obj_out) { diff --git a/modules/net/dap_chain_node_cli_cmd_tx.c b/modules/net/dap_chain_node_cli_cmd_tx.c index ccd6b5fde52ff42cf7246287cc323393a6032aa1..e2f6091f28841d4aefb7fed3f9df2c9aad7ba51d 100644 --- a/modules/net/dap_chain_node_cli_cmd_tx.c +++ b/modules/net/dap_chain_node_cli_cmd_tx.c @@ -342,7 +342,7 @@ json_object* dap_db_history_addr(dap_chain_addr_t *a_addr, dap_chain_t *a_chain, bool look_for_unknown_service = (a_srv && strcmp(a_srv,"unknown") == 0); size_t l_arr_start = 0; size_t l_arr_end = 0; - s_set_offset_limit_json(json_obj_datum, &l_arr_start, &l_arr_end, a_limit, a_offset, a_chain->callback_count_atom(a_chain)); + s_set_offset_limit_json(json_obj_datum, &l_arr_start, &l_arr_end, a_limit, a_offset, a_chain->callback_count_tx(a_chain)); size_t i_tmp = 0; size_t @@ -750,7 +750,7 @@ json_object *dap_db_history_tx_all(dap_chain_t *a_chain, dap_chain_net_t *a_net, json_object * json_tx_history = NULL; size_t l_arr_start = 0; size_t l_arr_end = 0; - s_set_offset_limit_json(json_arr_out, &l_arr_start, &l_arr_end, a_limit, a_offset, a_chain->callback_count_atom(a_chain)); + s_set_offset_limit_json(json_arr_out, &l_arr_start, &l_arr_end, a_limit, a_offset, a_chain->callback_count_tx(a_chain)); bool look_for_unknown_service = (a_srv && strcmp(a_srv,"unknown") == 0); if(a_head)