Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make max votes static again #4741

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions nano/node/cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ void nano::add_node_flag_options (boost::program_options::options_description &
("block_processor_verification_size", boost::program_options::value<std::size_t>(), "Increase batch signature verification size in block processor, default 0 (limited by config signature_checker_threads), unlimited for fast_bootstrap")
("inactive_votes_cache_size", boost::program_options::value<std::size_t>(), "Increase cached votes without active elections size, default 16384")
("vote_processor_capacity", boost::program_options::value<std::size_t>(), "Vote processor queue size before dropping votes, default 144k")
("disable_large_votes", boost::program_options::value<bool>(), "Disable large votes")
;
// clang-format on
}
Expand Down Expand Up @@ -182,12 +181,6 @@ std::error_code nano::update_flags (nano::node_flags & flags_a, boost::program_o
{
flags_a.vote_processor_capacity = vote_processor_capacity_it->second.as<std::size_t> ();
}
auto disable_large_votes_it = vm.find ("disable_large_votes");
if (disable_large_votes_it != vm.end ())
{
nano::network::confirm_req_hashes_max = 7;
nano::network::confirm_ack_hashes_max = 12;
}
// Config overriding
auto config (vm.find ("config"));
if (config != vm.end ())
Expand Down
4 changes: 0 additions & 4 deletions nano/node/network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@

using namespace std::chrono_literals;

// TODO: Return to static const and remove "disable_large_votes" when rolled out
std::size_t nano::network::confirm_req_hashes_max{ 255 };
std::size_t nano::network::confirm_ack_hashes_max{ 255 };

/*
* network
*/
Expand Down
4 changes: 2 additions & 2 deletions nano/node/network.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ class network final
static unsigned const broadcast_interval_ms = 10;
static std::size_t const buffer_size = 512;

static std::size_t confirm_req_hashes_max;
static std::size_t confirm_ack_hashes_max;
static const std::size_t confirm_req_hashes_max = 255;
static const std::size_t confirm_ack_hashes_max = 255;
};

std::unique_ptr<container_info_component> collect_container_info (network & network, std::string const & name);
Expand Down
Loading