Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
Make tpu_use_quic a flag only without argument (#24018)
Browse files Browse the repository at this point in the history
  • Loading branch information
lijunwangs authored Mar 31, 2022
1 parent ceb3b52 commit 98525dd
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions validator/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ use {
console::style,
log::*,
rand::{seq::SliceRandom, thread_rng},
send_transaction_service::DEFAULT_TPU_USE_QUIC,
solana_clap_utils::{
input_parsers::{keypair_of, keypairs_of, pubkey_of, value_of},
input_validators::{
Expand Down Expand Up @@ -460,7 +459,6 @@ pub fn main() {
let default_accounts_shrink_ratio = &DEFAULT_ACCOUNTS_SHRINK_RATIO.to_string();
let default_rocksdb_fifo_shred_storage_size =
&DEFAULT_ROCKS_FIFO_SHRED_STORAGE_SIZE_BYTES.to_string();
let default_tpu_use_quic = &DEFAULT_TPU_USE_QUIC.to_string();

let matches = App::new(crate_name!()).about(crate_description!())
.version(solana_version::version!())
Expand Down Expand Up @@ -1174,9 +1172,7 @@ pub fn main() {
.arg(
Arg::with_name("tpu_use_quic")
.long("tpu-use-quic")
.takes_value(true)
.value_name("BOOLEAN")
.default_value(default_tpu_use_quic)
.takes_value(false)
.help("When this is set to true, the system will use QUIC to send transactions."),
)
.arg(
Expand Down Expand Up @@ -2140,7 +2136,7 @@ pub fn main() {
let restricted_repair_only_mode = matches.is_present("restricted_repair_only_mode");
let accounts_shrink_optimize_total_space =
value_t_or_exit!(matches, "accounts_shrink_optimize_total_space", bool);
let tpu_use_quic = value_t_or_exit!(matches, "tpu_use_quic", bool);
let tpu_use_quic = matches.is_present("tpu_use_quic");

let shrink_ratio = value_t_or_exit!(matches, "accounts_shrink_ratio", f64);
if !(0.0..=1.0).contains(&shrink_ratio) {
Expand Down

0 comments on commit 98525dd

Please sign in to comment.