From f8f06a231b2fd52ab55e1d00cd65cbbbeeabf540 Mon Sep 17 00:00:00 2001 From: Guilherme Lawless Date: Mon, 26 Aug 2019 07:54:13 +0100 Subject: [PATCH] Fix some configs being overriden with 0 (#2251) --- nano/node/logging.cpp | 6 +++--- nano/node/nodeconfig.cpp | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/nano/node/logging.cpp b/nano/node/logging.cpp index c9a11787f..ba7fb190a 100644 --- a/nano/node/logging.cpp +++ b/nano/node/logging.cpp @@ -135,9 +135,9 @@ nano::error nano::logging::deserialize_toml (nano::tomlconfig & toml) toml.get ("single_line_record", single_line_record_value); toml.get ("max_size", max_size); toml.get ("rotation_size", rotation_size); - uintmax_t min_time_between_log_output_raw; - toml.get ("min_time_between_output", min_time_between_log_output_raw); - min_time_between_log_output = std::chrono::milliseconds (min_time_between_log_output_raw); + auto min_time_between_log_output_l = min_time_between_log_output.count (); + toml.get ("min_time_between_output", min_time_between_log_output_l); + min_time_between_log_output = std::chrono::milliseconds (min_time_between_log_output_l); return toml.get_error (); } diff --git a/nano/node/nodeconfig.cpp b/nano/node/nodeconfig.cpp index 62abc0a31..dcbc1a1b1 100644 --- a/nano/node/nodeconfig.cpp +++ b/nano/node/nodeconfig.cpp @@ -269,8 +269,10 @@ nano::error nano::node_config::deserialize_toml (nano::tomlconfig & toml) toml.get ("vote_generator_threshold", vote_generator_threshold); - auto block_processor_batch_max_time_l (toml.get ("block_processor_batch_max_time")); + auto block_processor_batch_max_time_l = block_processor_batch_max_time.count (); + toml.get ("block_processor_batch_max_time", block_processor_batch_max_time_l); block_processor_batch_max_time = std::chrono::milliseconds (block_processor_batch_max_time_l); + auto unchecked_cutoff_time_l = static_cast (unchecked_cutoff_time.count ()); toml.get ("unchecked_cutoff_time", unchecked_cutoff_time_l); unchecked_cutoff_time = std::chrono::seconds (unchecked_cutoff_time_l);