aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/cryptonote_core.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2016-09-29 22:15:21 +0200
committerRiccardo Spagni <ric@spagni.net>2016-09-29 22:15:21 +0200
commitaf831bed5cbfe48c04d6d5d427b7f88556e149dc (patch)
tree7454017ca432b5e878ec2e5da2600905b254e232 /src/cryptonote_core/cryptonote_core.cpp
parentf195a447ccf1a26eba8aaf7560e6bfc902db6f77 (diff)
parent5e3e362c854dd59c5399dbf6fe1a5675826f6732 (diff)
downloadmonzero-core-af831bed5cbfe48c04d6d5d427b7f88556e149dc.tar.gz
monzero-core-af831bed5cbfe48c04d6d5d427b7f88556e149dc.tar.xz
monzero-core-af831bed5cbfe48c04d6d5d427b7f88556e149dc.zip
Merge pull request #1129
5e3e362 core: make the sync chunk block count overridable (moneromooo-monero)
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.");