Remove useless arguments from the CLI
Removes: - disable_udp - enable_udp - disable_tcp_realtime (TCP cannot be disabled anymore)
This commit is contained in:
		
					parent
					
						
							
								10ce90d99b
							
						
					
				
			
			
				commit
				
					
						1865d616fa
					
				
			
		
					 2 changed files with 1 additions and 18 deletions
				
			
		| 
						 | 
					@ -30,10 +30,6 @@ std::string nano::error_cli_messages::message (int ev) const
 | 
				
			||||||
			return "Database write error";
 | 
								return "Database write error";
 | 
				
			||||||
		case nano::error_cli::reading_config:
 | 
							case nano::error_cli::reading_config:
 | 
				
			||||||
			return "Config file read error";
 | 
								return "Config file read error";
 | 
				
			||||||
		case nano::error_cli::disable_all_network:
 | 
					 | 
				
			||||||
			return "Flags --disable_tcp_realtime and --disable_udp cannot be used together";
 | 
					 | 
				
			||||||
		case nano::error_cli::ambiguous_udp_options:
 | 
					 | 
				
			||||||
			return "Flags --disable_udp and --enable_udp cannot be used together";
 | 
					 | 
				
			||||||
		case nano::error_cli::ambiguous_pruning_voting_options:
 | 
							case nano::error_cli::ambiguous_pruning_voting_options:
 | 
				
			||||||
			return "Flag --enable_pruning and enable_voting in node config cannot be used together";
 | 
								return "Flag --enable_pruning and enable_voting in node config cannot be used together";
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					@ -101,8 +97,6 @@ void nano::add_node_flag_options (boost::program_options::options_description &
 | 
				
			||||||
		("disable_rep_crawler", "Disable rep crawler")
 | 
							("disable_rep_crawler", "Disable rep crawler")
 | 
				
			||||||
		("disable_request_loop", "Disable request loop")
 | 
							("disable_request_loop", "Disable request loop")
 | 
				
			||||||
		("disable_bootstrap_listener", "Disables bootstrap processing for TCP listener (not including realtime network TCP connections)")
 | 
							("disable_bootstrap_listener", "Disables bootstrap processing for TCP listener (not including realtime network TCP connections)")
 | 
				
			||||||
		("disable_tcp_realtime", "Disables TCP realtime network")
 | 
					 | 
				
			||||||
		("enable_udp", "Enables UDP realtime network")
 | 
					 | 
				
			||||||
		("disable_unchecked_cleanup", "Disables periodic cleanup of old records from unchecked table")
 | 
							("disable_unchecked_cleanup", "Disables periodic cleanup of old records from unchecked table")
 | 
				
			||||||
		("disable_unchecked_drop", "Disables drop of unchecked table at startup")
 | 
							("disable_unchecked_drop", "Disables drop of unchecked table at startup")
 | 
				
			||||||
		("disable_providing_telemetry_metrics", "Disable using any node information in the telemetry_ack messages.")
 | 
							("disable_providing_telemetry_metrics", "Disable using any node information in the telemetry_ack messages.")
 | 
				
			||||||
| 
						 | 
					@ -133,17 +127,8 @@ std::error_code nano::update_flags (nano::node_flags & flags_a, boost::program_o
 | 
				
			||||||
	if (!flags_a.inactive_node)
 | 
						if (!flags_a.inactive_node)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		flags_a.disable_bootstrap_listener = (vm.count ("disable_bootstrap_listener") > 0);
 | 
							flags_a.disable_bootstrap_listener = (vm.count ("disable_bootstrap_listener") > 0);
 | 
				
			||||||
		flags_a.disable_tcp_realtime = (vm.count ("disable_tcp_realtime") > 0);
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	flags_a.disable_providing_telemetry_metrics = (vm.count ("disable_providing_telemetry_metrics") > 0);
 | 
						flags_a.disable_providing_telemetry_metrics = (vm.count ("disable_providing_telemetry_metrics") > 0);
 | 
				
			||||||
	if ((vm.count ("disable_udp") > 0) && (vm.count ("enable_udp") > 0))
 | 
					 | 
				
			||||||
	{
 | 
					 | 
				
			||||||
		ec = nano::error_cli::ambiguous_udp_options;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	if (flags_a.disable_tcp_realtime)
 | 
					 | 
				
			||||||
	{
 | 
					 | 
				
			||||||
		ec = nano::error_cli::disable_all_network;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	flags_a.disable_unchecked_cleanup = (vm.count ("disable_unchecked_cleanup") > 0);
 | 
						flags_a.disable_unchecked_cleanup = (vm.count ("disable_unchecked_cleanup") > 0);
 | 
				
			||||||
	flags_a.disable_unchecked_drop = (vm.count ("disable_unchecked_drop") > 0);
 | 
						flags_a.disable_unchecked_drop = (vm.count ("disable_unchecked_drop") > 0);
 | 
				
			||||||
	flags_a.disable_block_processor_unchecked_deletion = (vm.count ("disable_block_processor_unchecked_deletion") > 0);
 | 
						flags_a.disable_block_processor_unchecked_deletion = (vm.count ("disable_block_processor_unchecked_deletion") > 0);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -16,9 +16,7 @@ enum class error_cli
 | 
				
			||||||
	unknown_command = 4,
 | 
						unknown_command = 4,
 | 
				
			||||||
	database_write_error = 5,
 | 
						database_write_error = 5,
 | 
				
			||||||
	reading_config = 6,
 | 
						reading_config = 6,
 | 
				
			||||||
	disable_all_network = 7,
 | 
						ambiguous_pruning_voting_options = 7
 | 
				
			||||||
	ambiguous_udp_options = 8,
 | 
					 | 
				
			||||||
	ambiguous_pruning_voting_options = 9
 | 
					 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void add_node_options (boost::program_options::options_description &);
 | 
					void add_node_options (boost::program_options::options_description &);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue