From 21bb7e1489240e32b4ad2b30cc502a5cb1a44322 Mon Sep 17 00:00:00 2001 From: cryptocode Date: Tue, 20 Aug 2019 10:34:38 +0200 Subject: [PATCH] Incorporate work watcher period from #2222 --- nano/node/nodeconfig.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nano/node/nodeconfig.cpp b/nano/node/nodeconfig.cpp index eecf0776f3..e1c9a5ef46 100644 --- a/nano/node/nodeconfig.cpp +++ b/nano/node/nodeconfig.cpp @@ -95,6 +95,7 @@ nano::error nano::node_config::serialize_toml (nano::tomlconfig & toml) const toml.put ("active_elections_size", active_elections_size, "Limits number of active elections before dropping will be considered (other conditions must also be satisfied)\ntype:uint64,[250..]"); toml.put ("bandwidth_limit", bandwidth_limit, "Outbound traffic limit in bytes/sec after which messages will be dropped\ntype:uint64"); toml.put ("backup_before_upgrade", backup_before_upgrade, "Backup the ledger database before performing upgrades\ntype:bool"); + toml.put ("work_watcher_period", work_watcher_period.count (), "Time between checks for confirmation and re-generating higher difficulty work if unconfirmed, for blocks in the work watcher.\ntype:seconds"); auto work_peers_l (toml.create_array ("work_peers", "A list of \"address:port\" entries to identify work peers")); for (auto i (work_peers.begin ()), n (work_peers.end ()); i != n; ++i) @@ -290,6 +291,10 @@ nano::error nano::node_config::deserialize_toml (nano::tomlconfig & toml) toml.get ("bandwidth_limit", bandwidth_limit); toml.get ("backup_before_upgrade", backup_before_upgrade); + auto work_watcher_period_l = work_watcher_period.count (); + toml.get ("work_watcher_period", work_watcher_period_l); + work_watcher_period = std::chrono::seconds (work_watcher_period_l); + auto conf_height_processor_batch_min_time_l (conf_height_processor_batch_min_time.count ()); toml.get ("conf_height_processor_batch_min_time", conf_height_processor_batch_min_time_l); conf_height_processor_batch_min_time = std::chrono::milliseconds (conf_height_processor_batch_min_time_l);