aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_utilities
diff options
context:
space:
mode:
Diffstat (limited to 'src/blockchain_utilities')
-rw-r--r--src/blockchain_utilities/blockchain_export.cpp7
-rw-r--r--src/blockchain_utilities/blockchain_import.cpp3
-rw-r--r--src/blockchain_utilities/blocksdat_file.cpp2
3 files changed, 4 insertions, 8 deletions
diff --git a/src/blockchain_utilities/blockchain_export.cpp b/src/blockchain_utilities/blockchain_export.cpp
index fcf020057..b3e11605d 100644
--- a/src/blockchain_utilities/blockchain_export.cpp
+++ b/src/blockchain_utilities/blockchain_export.cpp
@@ -59,7 +59,6 @@ int main(int argc, char* argv[])
tools::on_startup();
boost::filesystem::path default_data_path {tools::get_default_data_dir()};
- boost::filesystem::path default_testnet_data_path {default_data_path / "testnet"};
boost::filesystem::path output_file_path;
po::options_description desc_cmd_only("Command line options");
@@ -73,8 +72,7 @@ int main(int argc, char* argv[])
const command_line::arg_descriptor<bool> arg_blocks_dat = {"blocksdat", "Output in blocks.dat format", blocks_dat};
- 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, cryptonote::arg_data_dir);
command_line::add_arg(desc_cmd_sett, arg_output_file);
command_line::add_arg(desc_cmd_sett, cryptonote::arg_testnet_on);
command_line::add_arg(desc_cmd_sett, arg_log_level);
@@ -118,8 +116,7 @@ int main(int argc, char* argv[])
std::string m_config_folder;
- 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);
+ m_config_folder = command_line::get_arg(vm, cryptonote::arg_data_dir);
std::string db_type = command_line::get_arg(vm, arg_database);
if (!cryptonote::blockchain_valid_db_type(db_type))
diff --git a/src/blockchain_utilities/blockchain_import.cpp b/src/blockchain_utilities/blockchain_import.cpp
index ce08022fc..6195e47e7 100644
--- a/src/blockchain_utilities/blockchain_import.cpp
+++ b/src/blockchain_utilities/blockchain_import.cpp
@@ -671,8 +671,7 @@ int main(int argc, char* argv[])
}
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);
+ m_config_folder = command_line::get_arg(vm, cryptonote::arg_data_dir);
db_arg_str = command_line::get_arg(vm, arg_database);
mlog_configure(mlog_get_default_log_path("monero-blockchain-import.log"), true);
diff --git a/src/blockchain_utilities/blocksdat_file.cpp b/src/blockchain_utilities/blocksdat_file.cpp
index 2bad86dfd..45ef33acb 100644
--- a/src/blockchain_utilities/blocksdat_file.cpp
+++ b/src/blockchain_utilities/blocksdat_file.cpp
@@ -106,7 +106,7 @@ void BlocksdatFile::write_block(const crypto::hash& block_hash)
{
crypto::hash hash;
crypto::cn_fast_hash(m_hashes.data(), HASH_OF_HASHES_STEP * sizeof(crypto::hash), hash);
- memmove(m_hashes.data(), m_hashes.data() + HASH_OF_HASHES_STEP * sizeof(crypto::hash), (m_hashes.size() - HASH_OF_HASHES_STEP) * sizeof(crypto::hash));
+ memmove(m_hashes.data(), m_hashes.data() + HASH_OF_HASHES_STEP, (m_hashes.size() - HASH_OF_HASHES_STEP) * sizeof(crypto::hash));
m_hashes.resize(m_hashes.size() - HASH_OF_HASHES_STEP);
const std::string data(hash.data, sizeof(hash));
*m_raw_data_file << data;