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

Feature: disable_activate_successors flag #4586

Merged
Merged
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
2 changes: 1 addition & 1 deletion nano/node/active_transactions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ void nano::active_transactions::block_cemented_callback (std::shared_ptr<nano::b
bool was_active = status.type == nano::election_status_type::active_confirmed_quorum || status.type == nano::election_status_type::active_confirmation_height;

// Next-block activations are only done for blocks with previously active elections
if (cemented_bootstrap_count_reached && was_active)
if (cemented_bootstrap_count_reached && was_active && !node.flags.disable_activate_successors)
{
activate_successors (transaction, block);
}
Expand Down
2 changes: 2 additions & 0 deletions nano/node/cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ void nano::add_node_flag_options (boost::program_options::options_description &
// clang-format off
description_a.add_options()
("disable_add_initial_peers", "Disable contacting the peer in the peers table at startup")
("disable_activate_successors", "Disables activate_successors in active_transactions")
("disable_backup", "Disable wallet automatic backups")
("disable_lazy_bootstrap", "Disables lazy bootstrap")
("disable_legacy_bootstrap", "Disables legacy bootstrap")
Expand Down Expand Up @@ -121,6 +122,7 @@ std::error_code nano::update_flags (nano::node_flags & flags_a, boost::program_o
{
std::error_code ec;
flags_a.disable_add_initial_peers = (vm.count ("disable_add_initial_peers") > 0);
flags_a.disable_activate_successors = (vm.count ("disable_activate_successors") > 0);
flags_a.disable_backup = (vm.count ("disable_backup") > 0);
flags_a.disable_lazy_bootstrap = (vm.count ("disable_lazy_bootstrap") > 0);
flags_a.disable_legacy_bootstrap = (vm.count ("disable_legacy_bootstrap") > 0);
Expand Down
1 change: 1 addition & 0 deletions nano/node/nodeconfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ class node_flags final
std::vector<std::string> config_overrides;
std::vector<std::string> rpc_config_overrides;
bool disable_add_initial_peers{ false }; // For testing only
bool disable_activate_successors{ false }; // For testing only
bool disable_backup{ false };
bool disable_lazy_bootstrap{ false };
bool disable_legacy_bootstrap{ false };
Expand Down
Loading