diff --git a/modules/service/xchange/dap_chain_net_srv_xchange.c b/modules/service/xchange/dap_chain_net_srv_xchange.c index 9b16ee7b0fbbea7637fa77f47363f5c7cb1e7fd9..cb08ddd68d1102e3c122018cf7245b9a8715ad42 100644 --- a/modules/service/xchange/dap_chain_net_srv_xchange.c +++ b/modules/service/xchange/dap_chain_net_srv_xchange.c @@ -3382,7 +3382,7 @@ static int s_cli_srv_xchange(int a_argc, char **a_argv, void **a_str_reply) dap_cli_server_cmd_find_option_val(a_argv, l_arg_index, a_argc, "-limit", &l_limit_str); dap_cli_server_cmd_find_option_val(a_argv, l_arg_index, a_argc, "-offset", &l_offset_str); size_t l_offset = l_offset_str ? strtoul(l_offset_str, NULL, 10) : 0; - size_t l_limit = l_limit_str ? strtoul(l_limit_str, NULL, 10) : 0; + size_t l_limit = l_limit_str ? strtoul(l_limit_str, NULL, 10) : 1000; char ** l_tickers = NULL; size_t l_tickers_count = 0; dap_ledger_addr_get_token_ticker_all( l_net->pub.ledger,NULL,&l_tickers,&l_tickers_count); @@ -3392,7 +3392,7 @@ static int s_cli_srv_xchange(int a_argc, char **a_argv, void **a_str_reply) size_t l_arr_start = 0; size_t l_arr_end = 0; json_object* json_arr_bl_cache_out = json_object_new_array(); - dap_chain_set_offset_limit_json(json_arr_bl_cache_out, &l_arr_start, &l_arr_end, l_limit, l_offset, l_tickers_count); + dap_chain_set_offset_limit_json(json_arr_bl_cache_out, &l_arr_start, &l_arr_end, l_limit, l_offset, l_tickers_count*l_tickers_count); size_t i_tmp = 0; for(size_t i = 0; i< l_tickers_count; i++){ for(size_t j = i+1; j< l_tickers_count; j++){