1
0
Fork 0
forked from lthn/blockchain

fixedbug with crash on autodoc

This commit is contained in:
cryptozoidberg 2024-04-10 13:50:03 +02:00
parent 75cb3bcaf8
commit cb1f62d4ff
No known key found for this signature in database
GPG key ID: 2E10CC61CAC8F36D
2 changed files with 5 additions and 16 deletions

View file

@ -272,24 +272,14 @@ int main(int argc, char* argv[])
if (stratum_enabled)
stratum_server_ptr = std::make_shared<currency::stratum_server>(&ccore);
if (command_line::has_arg(vm, command_line::arg_generate_rpc_autodoc))
{
LOG_PRINT_L0("Dumping RPC auto-generated documents!");
epee::net_utils::http::http_request_info query_info;
epee::net_utils::http::http_response_info response_info;
epee::net_utils::connection_context_base conn_context;
//std::string generate_reference = std::string("RPC_COMMANDS_LIST:\n");
documentation doc;
doc.do_generate_documentation = true;
bool call_found = false;
rpc_server.handle_http_request_map(query_info, response_info, conn_context, call_found, doc);
//std::string json_rpc_reference;
//query_info.m_URI = JSON_RPC_REFERENCE_MARKER;
//query_info.m_body = "{\"jsonrpc\": \"2.0\", \"method\": \"nonexisting_method\", \"params\": {}},";
//rpc_server.handle_http_request_map(query_info, response_info, conn_context, call_found, json_rpc_reference);
//LOG_PRINT_L0(generate_reference);
std::string path_to_generate = command_line::get_arg(vm, command_line::arg_generate_rpc_autodoc);
if (!generate_doc_as_md_files(path_to_generate, rpc_server))
return 1;
return 0;
}

View file

@ -2862,7 +2862,6 @@ int main(int argc, char* argv[])
message_writer(epee::log_space::console_color_white, true) << "Log level changed: " << old_log_level << " -> " << new_log_level;
}
if (command_line::has_arg(vm, command_line::arg_generate_rpc_autodoc))
{
tools::wallet_rpc_server wallet_rpc_server(std::shared_ptr<tools::wallet2>(new tools::wallet2()));