Skip to content

Commit

Permalink
Remove strictly-unnecessary flags
Browse files Browse the repository at this point in the history
  • Loading branch information
ryoqun committed Mar 22, 2023
1 parent 5446a61 commit 49eb374
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 23 deletions.
1 change: 0 additions & 1 deletion core/src/validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ const WAIT_FOR_SUPERMAJORITY_THRESHOLD_PERCENT: u64 = 80;
pub enum BlockVerificationMethod {
#[default]
BlockstoreProcessor,
UnifiedScheduler,
}

impl BlockVerificationMethod {
Expand Down
26 changes: 4 additions & 22 deletions ledger-tool/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use {
solana_cli_output::{CliAccount, CliAccountNewConfig, OutputFormat},
solana_core::{
system_monitor_service::{SystemMonitorService, SystemMonitorStatsReportConfig},
validator::{BlockProductionMethod, BlockVerificationMethod},
validator::BlockVerificationMethod,
},
solana_entry::entry::Entry,
solana_geyser_plugin_manager::geyser_plugin_service::GeyserPluginService,
Expand Down Expand Up @@ -1252,14 +1252,9 @@ fn load_bank_forks(
"block_verification_method",
BlockVerificationMethod
);
let block_production_method = value_t_or_exit!(
arg_matches,
"block_production_method",
BlockProductionMethod
);
info!(
"Using: block-verification-method: {}, block-production-method: {}",
block_verification_method, block_production_method
"Using: block-verification-method: {}",
block_verification_method,
);

let (snapshot_request_sender, snapshot_request_receiver) = crossbeam_channel::unbounded();
Expand Down Expand Up @@ -1655,10 +1650,7 @@ fn main() {
.to_string();
let default_graph_vote_account_mode = GraphVoteAccountMode::default();

let (block_verification_method_help, block_production_method_help) = (
&BlockVerificationMethod::cli_message(),
&BlockProductionMethod::cli_message(),
);
let block_verification_method_help = &BlockVerificationMethod::cli_message();

let mut measure_total_execution_time = Measure::start("ledger tool");

Expand Down Expand Up @@ -1727,16 +1719,6 @@ fn main() {
.hidden(hidden_unless_forced())
.help(block_verification_method_help),
)
.arg(
Arg::with_name("block_production_method")
.long("block-production-method")
.value_name("METHOD")
.takes_value(true)
.possible_values(BlockProductionMethod::cli_names())
.global(true)
.hidden(hidden_unless_forced())
.help(block_production_method_help),
)
.arg(
Arg::with_name("output_format")
.long("output")
Expand Down

0 comments on commit 49eb374

Please sign in to comment.