aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_utilities
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-11-14 21:31:50 +0200
committerRiccardo Spagni <ric@spagni.net>2017-11-14 21:31:51 +0200
commitedebe4e3b603fc391c698bf4d291336ba9376665 (patch)
tree53d687f5767f456284607ffa8e2808b251f2d7a0 /src/blockchain_utilities
parentMerge pull request #2644 (diff)
parentDo not build against epee_readline if it was not built (diff)
downloadmonero-edebe4e3b603fc391c698bf4d291336ba9376665.tar.xz
Merge pull request #2736
0d9c0db9 Do not build against epee_readline if it was not built (Howard Chu) 178014c9 split off readline code into epee_readline (moneromooo-monero) a9e14a19 link against readline only for monerod and wallet-wallet-{rpc,cli} (moneromooo-monero) 437421ce wallet: move some scoped_message_writer calls from the libs (moneromooo-monero) e89994e9 wallet: rejig to avoid prompting in wallet2 (moneromooo-monero) ec5135e5 move input_line from command_line to simplewallet (moneromooo-monero) 082db75f move cryptonote command line options to cryptonote_core (moneromooo-monero)
Diffstat (limited to 'src/blockchain_utilities')
-rw-r--r--src/blockchain_utilities/blockchain_export.cpp16
-rw-r--r--src/blockchain_utilities/blockchain_import.cpp9
2 files changed, 8 insertions, 17 deletions
diff --git a/src/blockchain_utilities/blockchain_export.cpp b/src/blockchain_utilities/blockchain_export.cpp
index 60672eeda..78bb51ab6 100644
--- a/src/blockchain_utilities/blockchain_export.cpp
+++ b/src/blockchain_utilities/blockchain_export.cpp
@@ -30,6 +30,7 @@
#include "blocksdat_file.h"
#include "common/command_line.h"
#include "cryptonote_core/tx_pool.h"
+#include "cryptonote_core/cryptonote_core.h"
#include "blockchain_db/blockchain_db.h"
#include "blockchain_db/db_types.h"
#include "version.h"
@@ -66,21 +67,16 @@ int main(int argc, char* argv[])
const command_line::arg_descriptor<std::string> arg_output_file = {"output-file", "Specify output file", "", true};
const command_line::arg_descriptor<std::string> arg_log_level = {"log-level", "0-4 or categories", ""};
const command_line::arg_descriptor<uint64_t> arg_block_stop = {"block-stop", "Stop at block number", block_stop};
- const command_line::arg_descriptor<bool> arg_testnet_on = {
- "testnet"
- , "Run on testnet."
- , false
- };
const command_line::arg_descriptor<std::string> arg_database = {
"database", available_dbs.c_str(), default_db_type
};
const command_line::arg_descriptor<bool> arg_blocks_dat = {"blocksdat", "Output in blocks.dat format", blocks_dat};
- command_line::add_arg(desc_cmd_sett, command_line::arg_data_dir, default_data_path.string());
- command_line::add_arg(desc_cmd_sett, command_line::arg_testnet_data_dir, default_testnet_data_path.string());
+ command_line::add_arg(desc_cmd_sett, cryptonote::arg_data_dir, default_data_path.string());
+ command_line::add_arg(desc_cmd_sett, cryptonote::arg_testnet_data_dir, default_testnet_data_path.string());
command_line::add_arg(desc_cmd_sett, arg_output_file);
- command_line::add_arg(desc_cmd_sett, arg_testnet_on);
+ command_line::add_arg(desc_cmd_sett, cryptonote::arg_testnet_on);
command_line::add_arg(desc_cmd_sett, arg_log_level);
command_line::add_arg(desc_cmd_sett, arg_database);
command_line::add_arg(desc_cmd_sett, arg_block_stop);
@@ -117,12 +113,12 @@ int main(int argc, char* argv[])
LOG_PRINT_L0("Starting...");
- bool opt_testnet = command_line::get_arg(vm, arg_testnet_on);
+ bool opt_testnet = command_line::get_arg(vm, cryptonote::arg_testnet_on);
bool opt_blocks_dat = command_line::get_arg(vm, arg_blocks_dat);
std::string m_config_folder;
- auto data_dir_arg = opt_testnet ? command_line::arg_testnet_data_dir : command_line::arg_data_dir;
+ auto data_dir_arg = opt_testnet ? cryptonote::arg_testnet_data_dir : cryptonote::arg_data_dir;
m_config_folder = command_line::get_arg(vm, data_dir_arg);
std::string db_type = command_line::get_arg(vm, arg_database);
diff --git a/src/blockchain_utilities/blockchain_import.cpp b/src/blockchain_utilities/blockchain_import.cpp
index 2153383bb..a50b0bad6 100644
--- a/src/blockchain_utilities/blockchain_import.cpp
+++ b/src/blockchain_utilities/blockchain_import.cpp
@@ -585,11 +585,6 @@ int main(int argc, char* argv[])
const command_line::arg_descriptor<uint64_t> arg_batch_size = {"batch-size", "", db_batch_size};
const command_line::arg_descriptor<uint64_t> arg_pop_blocks = {"pop-blocks", "Remove blocks from end of blockchain", num_blocks};
const command_line::arg_descriptor<bool> arg_drop_hf = {"drop-hard-fork", "Drop hard fork subdbs", false};
- const command_line::arg_descriptor<bool> arg_testnet_on = {
- "testnet"
- , "Run on testnet."
- , false
- };
const command_line::arg_descriptor<bool> arg_count_blocks = {
"count-blocks"
, "Count blocks in bootstrap file and exit"
@@ -674,8 +669,8 @@ int main(int argc, char* argv[])
}
}
- opt_testnet = command_line::get_arg(vm, arg_testnet_on);
- auto data_dir_arg = opt_testnet ? command_line::arg_testnet_data_dir : command_line::arg_data_dir;
+ opt_testnet = command_line::get_arg(vm, cryptonote::arg_testnet_on);
+ auto data_dir_arg = opt_testnet ? cryptonote::arg_testnet_data_dir : cryptonote::arg_data_dir;
m_config_folder = command_line::get_arg(vm, data_dir_arg);
db_arg_str = command_line::get_arg(vm, arg_database);