chore: cargo +nightly clippy --fix -Z unstable-options
This commit is contained in:
committed by
Michael Vines
parent
3570b00560
commit
6514096a67
@ -68,7 +68,7 @@ fn main() {
|
||||
.takes_value(true)
|
||||
.help("Configuration file to use");
|
||||
if let Some(ref config_file) = *solana_cli_config::CONFIG_FILE {
|
||||
arg.default_value(&config_file)
|
||||
arg.default_value(config_file)
|
||||
} else {
|
||||
arg
|
||||
}
|
||||
|
@ -195,7 +195,7 @@ async fn wait_for_validator_startup(
|
||||
}
|
||||
|
||||
if admin_client.is_none() {
|
||||
match admin_rpc_service::connect(&ledger_path).await {
|
||||
match admin_rpc_service::connect(ledger_path).await {
|
||||
Ok(new_admin_client) => admin_client = Some(new_admin_client),
|
||||
Err(err) => {
|
||||
progress_bar.set_message(format!("Unable to connect to validator: {}", err));
|
||||
|
@ -112,7 +112,7 @@ fn wait_for_restart_window(
|
||||
|
||||
let min_idle_slots = (min_idle_time_in_minutes as f64 * 60. / DEFAULT_S_PER_SLOT) as Slot;
|
||||
|
||||
let admin_client = admin_rpc_service::connect(&ledger_path);
|
||||
let admin_client = admin_rpc_service::connect(ledger_path);
|
||||
let rpc_addr = admin_rpc_service::runtime()
|
||||
.block_on(async move { admin_client.await?.rpc_addr().await })
|
||||
.map_err(|err| format!("Unable to get validator RPC address: {}", err))?;
|
||||
@ -474,7 +474,7 @@ fn get_rpc_node(
|
||||
rpc_peers
|
||||
} else {
|
||||
let trusted_snapshot_hashes =
|
||||
get_trusted_snapshot_hashes(&cluster_info, &validator_config.trusted_validators);
|
||||
get_trusted_snapshot_hashes(cluster_info, &validator_config.trusted_validators);
|
||||
|
||||
let mut eligible_rpc_peers = vec![];
|
||||
|
||||
@ -598,7 +598,7 @@ fn check_vote_account(
|
||||
}
|
||||
|
||||
for (_, vote_account_authorized_voter_pubkey) in vote_state.authorized_voters().iter() {
|
||||
if !authorized_voter_pubkeys.contains(&vote_account_authorized_voter_pubkey) {
|
||||
if !authorized_voter_pubkeys.contains(vote_account_authorized_voter_pubkey) {
|
||||
return Err(format!(
|
||||
"authorized voter {} not available",
|
||||
vote_account_authorized_voter_pubkey
|
||||
@ -686,7 +686,7 @@ fn verify_reachable_ports(
|
||||
("RPC", rpc_addr, &node.info.rpc),
|
||||
("RPC pubsub", rpc_pubsub_addr, &node.info.rpc_pubsub),
|
||||
] {
|
||||
if ContactInfo::is_valid_address(&public_addr) {
|
||||
if ContactInfo::is_valid_address(public_addr) {
|
||||
tcp_listeners.push((
|
||||
bind_addr.port(),
|
||||
TcpListener::bind(bind_addr).unwrap_or_else(|err| {
|
||||
@ -757,7 +757,7 @@ fn rpc_bootstrap(
|
||||
order.shuffle(&mut thread_rng());
|
||||
if order
|
||||
.into_iter()
|
||||
.all(|i| !verify_reachable_ports(&node, &cluster_entrypoints[i], &validator_config))
|
||||
.all(|i| !verify_reachable_ports(node, &cluster_entrypoints[i], validator_config))
|
||||
{
|
||||
exit(1);
|
||||
}
|
||||
@ -775,8 +775,8 @@ fn rpc_bootstrap(
|
||||
*start_progress.write().unwrap() = ValidatorStartProgress::SearchingForRpcService;
|
||||
|
||||
gossip = Some(start_gossip_node(
|
||||
&identity_keypair,
|
||||
&cluster_entrypoints,
|
||||
identity_keypair,
|
||||
cluster_entrypoints,
|
||||
ledger_path,
|
||||
&node.info.gossip,
|
||||
node.sockets.gossip.try_clone().unwrap(),
|
||||
@ -788,8 +788,8 @@ fn rpc_bootstrap(
|
||||
|
||||
let rpc_node_details = get_rpc_node(
|
||||
&gossip.as_ref().unwrap().0,
|
||||
&cluster_entrypoints,
|
||||
&validator_config,
|
||||
cluster_entrypoints,
|
||||
validator_config,
|
||||
&mut blacklisted_rpc_nodes,
|
||||
bootstrap_config.no_snapshot_fetch,
|
||||
bootstrap_config.no_untrusted_rpc,
|
||||
@ -816,7 +816,7 @@ fn rpc_bootstrap(
|
||||
.and_then(|_| {
|
||||
let genesis_config = download_then_check_genesis_hash(
|
||||
&rpc_contact_info.rpc,
|
||||
&ledger_path,
|
||||
ledger_path,
|
||||
validator_config.expected_genesis_hash,
|
||||
bootstrap_config.max_genesis_archive_unpacked_size,
|
||||
bootstrap_config.no_genesis_fetch,
|
||||
@ -897,7 +897,7 @@ fn rpc_bootstrap(
|
||||
};
|
||||
let ret = download_snapshot(
|
||||
&rpc_contact_info.rpc,
|
||||
&snapshot_output_dir,
|
||||
snapshot_output_dir,
|
||||
snapshot_hash,
|
||||
use_progress_bar,
|
||||
maximum_snapshots_to_retain,
|
||||
@ -946,7 +946,7 @@ fn rpc_bootstrap(
|
||||
check_vote_account(
|
||||
&rpc_client,
|
||||
&identity_keypair.pubkey(),
|
||||
&vote_account,
|
||||
vote_account,
|
||||
&authorized_voter_keypairs
|
||||
.read()
|
||||
.unwrap()
|
||||
@ -1680,7 +1680,7 @@ pub fn main() {
|
||||
.long("max-genesis-archive-unpacked-size")
|
||||
.value_name("NUMBER")
|
||||
.takes_value(true)
|
||||
.default_value(&default_genesis_archive_unpacked_size)
|
||||
.default_value(default_genesis_archive_unpacked_size)
|
||||
.help(
|
||||
"maximum total uncompressed file size of downloaded genesis archive",
|
||||
),
|
||||
@ -2141,10 +2141,10 @@ pub fn main() {
|
||||
cuda: matches.is_present("cuda"),
|
||||
expected_genesis_hash: matches
|
||||
.value_of("expected_genesis_hash")
|
||||
.map(|s| Hash::from_str(&s).unwrap()),
|
||||
.map(|s| Hash::from_str(s).unwrap()),
|
||||
expected_bank_hash: matches
|
||||
.value_of("expected_bank_hash")
|
||||
.map(|s| Hash::from_str(&s).unwrap()),
|
||||
.map(|s| Hash::from_str(s).unwrap()),
|
||||
expected_shred_version: value_t!(matches, "expected_shred_version", u16).ok(),
|
||||
new_hard_forks: hardforks_of(&matches, "hard_forks"),
|
||||
rpc_config: JsonRpcConfig {
|
||||
|
Reference in New Issue
Block a user