Remove disable_ascending_bootstrap flag

This commit is contained in:
Piotr Wójcik 2024-10-29 18:04:26 +01:00
commit bbf07116f2
8 changed files with 14 additions and 18 deletions

View file

@ -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
@ -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));

View file

@ -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));

View file

@ -72,7 +72,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;
}

View file

@ -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)")
@ -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);

View file

@ -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 ();

View file

@ -171,7 +171,6 @@ public:
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 };

View file

@ -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);

View file

@ -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;