aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2019-03-19 10:59:54 +0200
committerRiccardo Spagni <ric@spagni.net>2019-03-19 10:59:55 +0200
commitf2f725d8db3535055d1c7e102c0bba75b22a3409 (patch)
treef85b12e7afcdf85ccbe077d4d92ddb0f97219b47
parentMerge pull request #5203 (diff)
parentcn_deserialize: remove some unused code (diff)
downloadmonero-f2f725d8db3535055d1c7e102c0bba75b22a3409.tar.xz
Merge pull request #5201
4921c794 cn_deserialize: remove some unused code (moneromooo-monero)
-rw-r--r--src/debug_utilities/cn_deserialize.cpp50
1 files changed, 0 insertions, 50 deletions
diff --git a/src/debug_utilities/cn_deserialize.cpp b/src/debug_utilities/cn_deserialize.cpp
index 87ded76bd..89c9db02e 100644
--- a/src/debug_utilities/cn_deserialize.cpp
+++ b/src/debug_utilities/cn_deserialize.cpp
@@ -80,11 +80,9 @@ int main(int argc, char* argv[])
po::options_description desc_cmd_only("Command line options");
po::options_description desc_cmd_sett("Command line options and settings options");
- const command_line::arg_descriptor<std::string> arg_output_file = {"output-file", "Specify output file", "", true};
const command_line::arg_descriptor<uint32_t> arg_log_level = {"log-level", "", log_level};
const command_line::arg_descriptor<std::string> arg_input = {"input", "Specify input has a hexadecimal string", ""};
- command_line::add_arg(desc_cmd_sett, arg_output_file);
command_line::add_arg(desc_cmd_sett, arg_log_level);
command_line::add_arg(desc_cmd_sett, arg_input);
@@ -120,52 +118,10 @@ int main(int argc, char* argv[])
mlog_configure("", true);
- std::string m_config_folder;
-
- std::ostream *output;
- std::ofstream *raw_data_file = NULL;
- if (command_line::has_arg(vm, arg_output_file))
- {
- output_file_path = boost::filesystem::path(command_line::get_arg(vm, arg_output_file));
-
- const boost::filesystem::path dir_path = output_file_path.parent_path();
- if (!dir_path.empty())
- {
- if (boost::filesystem::exists(dir_path))
- {
- if (!boost::filesystem::is_directory(dir_path))
- {
- std::cerr << "output directory path is a file: " << dir_path << std::endl;
- return 1;
- }
- }
- else
- {
- if (!boost::filesystem::create_directory(dir_path))
- {
- std::cerr << "Failed to create directory " << dir_path << std::endl;
- return 1;
- }
- }
- }
-
- raw_data_file = new std::ofstream();
- raw_data_file->open(output_file_path.string(), std::ios_base::out | std::ios::trunc);
- if (raw_data_file->fail())
- return 1;
- output = raw_data_file;
- }
- else
- {
- output_file_path = "";
- output = &std::cout;
- }
-
cryptonote::blobdata blob;
if (!epee::string_tools::parse_hexstr_to_binbuff(input, blob))
{
std::cerr << "Invalid hex input" << std::endl;
- std::cerr << "Invalid hex input: " << input << std::endl;
return 1;
}
@@ -212,11 +168,5 @@ int main(int argc, char* argv[])
- if (output->fail())
- return 1;
- output->flush();
- if (raw_data_file)
- delete raw_data_file;
-
return 0;
}