Skip to content

Commit

Permalink
update default limit to (5 * 1024 * 1024) or 5Mb/s (#2119)
Browse files Browse the repository at this point in the history
  • Loading branch information
Russel Waters authored Jul 3, 2019
1 parent 4599b43 commit 5b15bb6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions nano/core_test/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ TEST (node_config, v17_values)
tree.put ("use_memory_pools", true);
tree.put ("confirmation_history_size", 2048);
tree.put ("active_elections_size", 8000);
tree.put ("bandwidth_limit", 1572864);
tree.put ("bandwidth_limit", 5242880);
tree.put ("conf_height_processor_batch_min_time", 0);
}

Expand All @@ -795,7 +795,7 @@ TEST (node_config, v17_values)
ASSERT_TRUE (config.use_memory_pools);
ASSERT_EQ (config.confirmation_history_size, 2048);
ASSERT_EQ (config.active_elections_size, 8000);
ASSERT_EQ (config.bandwidth_limit, 1572864);
ASSERT_EQ (config.bandwidth_limit, 5242880);
ASSERT_EQ (config.conf_height_processor_batch_min_time.count (), 0);

// Check config is correct with other values
Expand Down
2 changes: 1 addition & 1 deletion nano/node/nodeconfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ nano::error nano::node_config::deserialize_json (bool & upgraded_a, nano::jsonco
}
if (bandwidth_limit > std::numeric_limits<size_t>::max ())
{
json.get_error ().set ("bandwidth_limit unbounded = 0, default = 1572864, max = 18446744073709551615");
json.get_error ().set ("bandwidth_limit unbounded = 0, default = 5242880, max = 18446744073709551615");
}
if (vote_generator_threshold < 1 || vote_generator_threshold > 12)
{
Expand Down
2 changes: 1 addition & 1 deletion nano/node/nodeconfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class node_config
static std::chrono::seconds constexpr keepalive_period = std::chrono::seconds (60);
static std::chrono::seconds constexpr keepalive_cutoff = keepalive_period * 5;
static std::chrono::minutes constexpr wallet_backup_interval = std::chrono::minutes (5);
size_t bandwidth_limit{ 1536 * 1024 };
size_t bandwidth_limit{ 5 * 1024 * 1024 }; // 5Mb/s
std::chrono::milliseconds conf_height_processor_batch_min_time{ 50 };
static int json_version ()
{
Expand Down

0 comments on commit 5b15bb6

Please sign in to comment.