mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-20 13:24:44 +00:00
Appease clippy
This commit is contained in:
@@ -301,14 +301,14 @@ async fn build_validator_spec_from_cli<'a>(
|
||||
*/
|
||||
|
||||
let mut validators = Vec::with_capacity(count as usize);
|
||||
let mut deposits = disable_deposits.then(|| vec![]);
|
||||
let mut deposits = disable_deposits.then(Vec::new);
|
||||
|
||||
for (i, derivation_index) in (first_index..first_index + count).enumerate() {
|
||||
// If the voting keystore password was not provided by the user then use a unique random
|
||||
// string for each validator.
|
||||
let voting_keystore_password = voting_keystore_password
|
||||
.clone()
|
||||
.unwrap_or_else(|| random_password_string());
|
||||
.unwrap_or_else(random_password_string);
|
||||
|
||||
// Set the wallet to the appropriate derivation index.
|
||||
wallet
|
||||
@@ -372,7 +372,7 @@ async fn build_validator_spec_from_cli<'a>(
|
||||
let withdrawal_credentials = if let Some(eth1_withdrawal_address) =
|
||||
eth1_withdrawal_address
|
||||
{
|
||||
WithdrawalCredentials::eth1(eth1_withdrawal_address, &spec)
|
||||
WithdrawalCredentials::eth1(eth1_withdrawal_address, spec)
|
||||
} else {
|
||||
// Decrypt the withdrawal keystore so withdrawal credentials can be created. It's
|
||||
// not strictly necessary to decrypt the keystore since we can read the pubkey
|
||||
@@ -382,7 +382,7 @@ async fn build_validator_spec_from_cli<'a>(
|
||||
.withdrawal
|
||||
.decrypt_keypair(withdrawal_keystore_password.as_ref())
|
||||
.map_err(|e| format!("Failed to decrypt withdrawal keystore {}: {:?}", i, e))?;
|
||||
WithdrawalCredentials::bls(&withdrawal_keypair.pk, &spec)
|
||||
WithdrawalCredentials::bls(&withdrawal_keypair.pk, spec)
|
||||
};
|
||||
|
||||
// Create a JSON structure equivalent to the one generated by
|
||||
@@ -391,7 +391,7 @@ async fn build_validator_spec_from_cli<'a>(
|
||||
&voting_keypair,
|
||||
withdrawal_credentials.into(),
|
||||
deposit_gwei,
|
||||
&spec,
|
||||
spec,
|
||||
)?;
|
||||
|
||||
deposits.push(json_deposit);
|
||||
|
||||
Reference in New Issue
Block a user