aboutsummaryrefslogtreecommitdiff
path: root/src/daemon
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon')
-rw-r--r--src/daemon/CMakeLists.txt13
-rw-r--r--src/daemon/command_line_args.h27
-rw-r--r--src/daemon/main.cpp6
3 files changed, 42 insertions, 4 deletions
diff --git a/src/daemon/CMakeLists.txt b/src/daemon/CMakeLists.txt
index f06712946..8275429db 100644
--- a/src/daemon/CMakeLists.txt
+++ b/src/daemon/CMakeLists.txt
@@ -26,6 +26,12 @@
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+set(blocksdat "")
+if(APPLE AND PER_BLOCK_CHECKPOINT)
+ add_custom_command(OUTPUT blocksdat.o COMMAND cd ${CMAKE_CURRENT_SOURCE_DIR} && ${CMAKE_C_COMPILER} -o stub.o -c stub.c COMMAND cd ${CMAKE_CURRENT_SOURCE_DIR} && ld -r -sectcreate __DATA __blocks_dat ../blocks/blocks.dat -o ${CMAKE_CURRENT_BINARY_DIR}/blocksdat.o stub.o)
+ set(blocksdat "blocksdat.o")
+endif()
+
set(daemon_sources
command_parser_executor.cpp
command_server.cpp
@@ -69,7 +75,9 @@ bitmonero_private_headers(daemon
bitmonero_add_executable(daemon
${daemon_sources}
${daemon_headers}
- ${daemon_private_headers})
+ ${daemon_private_headers}
+ ${blocksdat}
+)
target_link_libraries(daemon
LINK_PRIVATE
rpc
@@ -90,8 +98,7 @@ target_link_libraries(daemon
${CMAKE_THREAD_LIBS_INIT}
${UPNP_LIBRARIES}
${EXTRA_LIBRARIES})
-add_dependencies(daemon
- version)
+add_dependencies(daemon version)
set_property(TARGET daemon
PROPERTY
OUTPUT_NAME "bitmonerod")
diff --git a/src/daemon/command_line_args.h b/src/daemon/command_line_args.h
index 2aa212b5e..ba98a6ea1 100644
--- a/src/daemon/command_line_args.h
+++ b/src/daemon/command_line_args.h
@@ -75,7 +75,32 @@ namespace daemon_args
, "Specify database type"
, "lmdb"
};
-
+ const command_line::arg_descriptor<uint64_t> arg_prep_blocks_threads = {
+ "prep-blocks-threads"
+ , "Max number of threads to use when preparing block hashes in groups."
+ , 4
+ };
+ const command_line::arg_descriptor<uint64_t> arg_fast_block_sync = {
+ "fast-block-sync"
+ , "Test fast block-sync option using temporarily embedded known block hashes."
+ , 1
+ };
+ const command_line::arg_descriptor<uint64_t> arg_show_time_stats = {
+ "show-time-stats"
+ , "Show time-stats when processing blocks/txs and disk synchronization."
+ , 1
+ };
+ const command_line::arg_descriptor<uint64_t> arg_db_auto_remove_logs = {
+ "db-auto-remove-logs"
+ , "For BerkeleyDB only. Remove transactions logs automatically."
+ , 1
+ };
+ const command_line::arg_descriptor<std::string> arg_db_sync_mode = {
+ "db-sync-mode"
+ , "Specify sync option, using format [safe|fast|fastest]:[sync|async]:[nblocks_per_sync]."
+ , "fastest:async:1000"
+ };
+;
} // namespace daemon_args
#endif // DAEMON_COMMAND_LINE_ARGS_H
diff --git a/src/daemon/main.cpp b/src/daemon/main.cpp
index b574200be..547f4bd9e 100644
--- a/src/daemon/main.cpp
+++ b/src/daemon/main.cpp
@@ -86,6 +86,12 @@ int main(int argc, char const * argv[])
command_line::add_arg(core_settings, daemon_args::arg_testnet_on);
command_line::add_arg(core_settings, daemon_args::arg_dns_checkpoints);
command_line::add_arg(core_settings, daemon_args::arg_db_type);
+ command_line::add_arg(core_settings, daemon_args::arg_prep_blocks_threads);
+ command_line::add_arg(core_settings, daemon_args::arg_fast_block_sync);
+ command_line::add_arg(core_settings, daemon_args::arg_db_sync_mode);
+ command_line::add_arg(core_settings, daemon_args::arg_show_time_stats);
+ command_line::add_arg(core_settings, daemon_args::arg_db_auto_remove_logs);
+
daemonizer::init_options(hidden_options, visible_options);
daemonize::t_executor::init_options(core_settings);