aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/cryptonote_core.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-09-24 17:00:19 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-09-24 17:00:19 +0100
commit5e3e362c854dd59c5399dbf6fe1a5675826f6732 (patch)
treed81eef8351868e035e9bb864c8d744b55a0fba9d /src/cryptonote_core/cryptonote_core.cpp
parent53e18cafdfb2bf24e8e0f8dd7355733eb31dc1c4 (diff)
downloadmonzero-core-5e3e362c854dd59c5399dbf6fe1a5675826f6732.tar.gz
monzero-core-5e3e362c854dd59c5399dbf6fe1a5675826f6732.tar.xz
monzero-core-5e3e362c854dd59c5399dbf6fe1a5675826f6732.zip
core: make the sync chunk block count overridable
Diffstat (limited to 'src/cryptonote_core/cryptonote_core.cpp')
-rw-r--r--src/cryptonote_core/cryptonote_core.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp
index c289f297b..4abf6a898 100644
--- a/src/cryptonote_core/cryptonote_core.cpp
+++ b/src/cryptonote_core/cryptonote_core.cpp
@@ -142,6 +142,7 @@ namespace cryptonote
command_line::add_arg(desc, command_line::arg_db_sync_mode);
command_line::add_arg(desc, command_line::arg_show_time_stats);
command_line::add_arg(desc, command_line::arg_db_auto_remove_logs);
+ command_line::add_arg(desc, command_line::arg_block_sync_size);
}
//-----------------------------------------------------------------------------------------------
bool core::handle_command_line(const boost::program_options::variables_map& vm)
@@ -403,6 +404,10 @@ namespace cryptonote
m_blockchain_storage.set_show_time_stats(show_time_stats);
CHECK_AND_ASSERT_MES(r, false, "Failed to initialize blockchain storage");
+ block_sync_size = command_line::get_arg(vm, command_line::arg_block_sync_size);
+ if (block_sync_size == 0)
+ block_sync_size = BLOCKS_SYNCHRONIZING_DEFAULT_COUNT;
+
// load json & DNS checkpoints, and verify them
// with respect to what blocks we already have
CHECK_AND_ASSERT_MES(update_checkpoints(), false, "One or more checkpoints loaded from json or dns conflicted with existing checkpoints.");