Skip to content

Commit

Permalink
Remove disable_ascending_bootstrap flag
Browse files Browse the repository at this point in the history
  • Loading branch information
pwojcikdev committed Oct 29, 2024
1 parent d0d3569 commit 9cd703b
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 18 deletions.
10 changes: 6 additions & 4 deletions nano/core_test/active_elections.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,9 @@ TEST (active_elections, confirm_frontier)
nano::node_flags node_flags;
node_flags.disable_request_loop = true;
node_flags.disable_ongoing_bootstrap = true;
node_flags.disable_ascending_bootstrap = true;
auto & node1 = *system.add_node (node_flags);
nano::node_config node_config;
node_config.bootstrap.enable = false;
auto & node1 = *system.add_node (node_config, node_flags);
system.wallet (0)->insert_adhoc (nano::dev::genesis_key.prv);

// we cannot use the same block instance on 2 different nodes, so make a copy
Expand All @@ -134,10 +135,11 @@ TEST (active_elections, confirm_frontier)
// The rep crawler would otherwise request confirmations in order to find representatives
nano::node_flags node_flags2;
node_flags2.disable_ongoing_bootstrap = true;
node_flags2.disable_ascending_bootstrap = true;
node_flags2.disable_rep_crawler = true;
nano::node_config node_config2;
node_config2.bootstrap.enable = false;
// start node2 later so that we do not get the gossip traffic
auto & node2 = *system.add_node (node_flags2);
auto & node2 = *system.add_node (node_config2, node_flags2);

// Add representative to disabled rep crawler
auto peers (node2.network.random_set (1));
Expand Down
5 changes: 2 additions & 3 deletions nano/core_test/confirming_set.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,10 @@ TEST (confirmation_callback, observer_callbacks)
TEST (confirmation_callback, confirmed_history)
{
nano::test::system system;
nano::node_flags node_flags;
node_flags.disable_ascending_bootstrap = true;
nano::node_config node_config = system.default_config ();
node_config.backlog_population.enable = false;
auto node = system.add_node (node_config, node_flags);
node_config.bootstrap.enable = false;
auto node = system.add_node (node_config);

nano::block_hash latest (node->latest (nano::dev::genesis_key.pub));

Expand Down
2 changes: 1 addition & 1 deletion nano/node/bootstrap/bootstrap_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void nano::bootstrap_service::start ()

if (!config.enable)
{
logger.warn (nano::log::type::bootstrap, "Ascending bootstrap is disabled");
logger.warn (nano::log::type::bootstrap, "Bootstrap is disabled, node will not be able to synchronize with the network");
return;
}

Expand Down
2 changes: 0 additions & 2 deletions nano/node/cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ void nano::add_node_flag_options (boost::program_options::options_description &
("disable_legacy_bootstrap", "Disables legacy bootstrap")
("disable_wallet_bootstrap", "Disables wallet lazy bootstrap")
("disable_ongoing_bootstrap", "Disable ongoing bootstrap")
("disable_ascending_bootstrap", "Disable ascending bootstrap")
("disable_rep_crawler", "Disable rep crawler")
("disable_request_loop", "Disable request loop")
("disable_bootstrap_listener", "Disables bootstrap processing for TCP listener (not including realtime network TCP connections)")
Expand Down Expand Up @@ -138,7 +137,6 @@ std::error_code nano::update_flags (nano::node_flags & flags_a, boost::program_o
flags_a.disable_legacy_bootstrap = (vm.count ("disable_legacy_bootstrap") > 0);
flags_a.disable_wallet_bootstrap = (vm.count ("disable_wallet_bootstrap") > 0);
flags_a.disable_ongoing_bootstrap = (vm.count ("disable_ongoing_bootstrap") > 0);
flags_a.disable_ascending_bootstrap = (vm.count ("disable_ascending_bootstrap") > 0);
flags_a.disable_rep_crawler = (vm.count ("disable_rep_crawler") > 0);
flags_a.disable_request_loop = (vm.count ("disable_request_loop") > 0);
flags_a.disable_bootstrap_bulk_pull_server = (vm.count ("disable_bootstrap_bulk_pull_server") > 0);
Expand Down
5 changes: 1 addition & 4 deletions nano/node/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -624,10 +624,7 @@ void nano::node::start ()
aggregator.start ();
backlog.start ();
bootstrap_server.start ();
if (!flags.disable_ascending_bootstrap)
{
bootstrap.start ();
}
bootstrap.start ();
websocket.start ();
telemetry.start ();
stats.start ();
Expand Down
1 change: 0 additions & 1 deletion nano/node/nodeconfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ class node_flags final
bool disable_bootstrap_bulk_pull_server{ false };
bool disable_bootstrap_bulk_push_client{ false };
bool disable_ongoing_bootstrap{ false }; // For testing only
bool disable_ascending_bootstrap{ false };
bool disable_rep_crawler{ false };
bool disable_request_loop{ false }; // For testing only
bool disable_tcp_realtime{ false };
Expand Down
2 changes: 1 addition & 1 deletion nano/slow_test/bootstrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ TEST (bootstrap, profile)
nano::node_config config_server{ network_params };
config_server.preconfigured_peers.clear ();
config_server.bandwidth_limit = 0; // Unlimited server bandwidth
config_server.bootstrap.enable = false;
nano::node_flags flags_server;
flags_server.disable_legacy_bootstrap = true;
flags_server.disable_wallet_bootstrap = true;
flags_server.disable_add_initial_peers = true;
flags_server.disable_ongoing_bootstrap = true;
flags_server.disable_ascending_bootstrap = true;
auto data_path_server = nano::working_path (network);
// auto data_path_server = "";
auto server = std::make_shared<nano::node> (system.io_ctx, data_path_server, config_server, system.work, flags_server);
Expand Down
5 changes: 3 additions & 2 deletions nano/slow_test/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1905,8 +1905,9 @@ TEST (node, aggressive_flooding)
node_flags.disable_lazy_bootstrap = true;
node_flags.disable_legacy_bootstrap = true;
node_flags.disable_wallet_bootstrap = true;
node_flags.disable_ascending_bootstrap = true;
auto & node1 (*system.add_node (node_flags));
nano::node_config node_config;
node_config.bootstrap.enable = false;
auto & node1 (*system.add_node (node_config, node_flags));
auto & wallet1 (*system.wallet (0));
wallet1.insert_adhoc (nano::dev::genesis_key.prv);
std::vector<std::pair<std::shared_ptr<nano::node>, std::shared_ptr<nano::wallet>>> nodes_wallets;
Expand Down

0 comments on commit 9cd703b

Please sign in to comment.