Use 'enable' in configs for consistency (#4678)

* Use 'enable' in configs for consistency

* Adjust unit tests

---------

Co-authored-by: gr0vity-dev <homebot@users.noreply.github.com>
This commit is contained in:
gr0vity-dev 2024-07-15 16:55:24 +02:00 committed by GitHub
commit 5983818695
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 5 additions and 5 deletions

View file

@ -544,12 +544,12 @@ TEST (toml, daemon_config_deserialize_no_defaults)
map_size = 999
[node.optimistic_scheduler]
enabled = false
enable = false
gap_threshold = 999
max_size = 999
[node.hinted_scheduler]
enabled = false
enable = false
hinting_threshold = 99
check_interval = 999
block_cooldown = 999

View file

@ -123,7 +123,7 @@ nano::error nano::monitor_config::serialize (nano::tomlconfig & toml) const
nano::error nano::monitor_config::deserialize (nano::tomlconfig & toml)
{
toml.get ("enabled", enabled);
toml.get ("enable", enabled);
auto interval_l = interval.count ();
toml.get ("interval", interval_l);
interval = std::chrono::seconds{ interval_l };

View file

@ -271,7 +271,7 @@ nano::error nano::scheduler::hinted_config::serialize (nano::tomlconfig & toml)
nano::error nano::scheduler::hinted_config::deserialize (nano::tomlconfig & toml)
{
toml.get ("enabled", enabled);
toml.get ("enable", enabled);
toml.get ("hinting_threshold", hinting_threshold_percent);
auto check_interval_l = check_interval.count ();

View file

@ -183,7 +183,7 @@ std::unique_ptr<nano::container_info_component> nano::scheduler::optimistic::col
nano::error nano::scheduler::optimistic_config::deserialize (nano::tomlconfig & toml)
{
toml.get ("enabled", enabled);
toml.get ("enable", enabled);
toml.get ("gap_threshold", gap_threshold);
toml.get ("max_size", max_size);