Skip to content

Commit

Permalink
Use 'enable' in configs for consistency (#4678)
Browse files Browse the repository at this point in the history
* Use 'enable' in configs for consistency

* Adjust unit tests

---------

Co-authored-by: gr0vity-dev <[email protected]>
  • Loading branch information
gr0vity-dev and gr0vity-dev authored Jul 15, 2024
1 parent 1cd5564 commit 5983818
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions nano/core_test/toml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion nano/node/monitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand Down
2 changes: 1 addition & 1 deletion nano/node/scheduler/hinted.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ();
Expand Down
2 changes: 1 addition & 1 deletion nano/node/scheduler/optimistic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 5983818

Please sign in to comment.