Skip to content
Snippets Groups Projects
Commit c77dc61e authored by roman.padenkov's avatar roman.padenkov
Browse files

changed block hash out to hex format

parent ab2cde87
No related branches found
No related tags found
1 merge request!1640hotfix-11826
Pipeline #39891 passed with stage
in 8 minutes and 22 seconds
...@@ -663,7 +663,15 @@ static int s_cli_blocks(int a_argc, char ** a_argv, void **a_str_reply) ...@@ -663,7 +663,15 @@ static int s_cli_blocks(int a_argc, char ** a_argv, void **a_str_reply)
}break; }break;
case SUBCMD_DUMP:{ case SUBCMD_DUMP:{
const char *l_hash_out_type = NULL;
dap_chain_hash_fast_t l_block_hash={0}; dap_chain_hash_fast_t l_block_hash={0};
dap_cli_server_cmd_find_option_val(a_argv, arg_index, a_argc, "-H", &l_hash_out_type);
if(!l_hash_out_type)
l_hash_out_type = "hex";
if(dap_strcmp(l_hash_out_type,"hex") && dap_strcmp(l_hash_out_type,"base58")) {
dap_json_rpc_error_add(DAP_CHAIN_NODE_CLI_COM_BLOCK_PARAM_ERR, "invalid parameter -H, valid values: -H <hex | base58>");
return DAP_CHAIN_NODE_CLI_COM_BLOCK_PARAM_ERR;
}
if (!l_subcmd_str_arg) { if (!l_subcmd_str_arg) {
dap_json_rpc_error_add(DAP_CHAIN_NODE_CLI_COM_BLOCK_HASH_ERR, "Enter block hash "); dap_json_rpc_error_add(DAP_CHAIN_NODE_CLI_COM_BLOCK_HASH_ERR, "Enter block hash ");
return DAP_CHAIN_NODE_CLI_COM_BLOCK_HASH_ERR; return DAP_CHAIN_NODE_CLI_COM_BLOCK_HASH_ERR;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment