Fix clippy lints

This commit is contained in:
Paul Hauner
2023-07-10 17:51:44 +10:00
parent fb51b09b60
commit ad65cf65f3
4 changed files with 16 additions and 4 deletions

View File

@@ -135,6 +135,7 @@ impl ApiTester {
store_passwords_in_secrets_dir: false, store_passwords_in_secrets_dir: false,
}, },
log, log,
sse_logging_components: None,
slot_clock, slot_clock,
_phantom: PhantomData, _phantom: PhantomData,
}); });
@@ -146,7 +147,7 @@ impl ApiTester {
}; };
let (listening_socket, server) = super::serve(ctx, server_shutdown).unwrap(); let (listening_socket, server) = super::serve(ctx, server_shutdown).unwrap();
tokio::spawn(async { server.await }); tokio::spawn(server);
let url = SensitiveUrl::parse(&format!( let url = SensitiveUrl::parse(&format!(
"http://{}:{}", "http://{}:{}",
@@ -504,7 +505,7 @@ impl ApiTester {
let validator = &self.client.get_lighthouse_validators().await.unwrap().data[index]; let validator = &self.client.get_lighthouse_validators().await.unwrap().data[index];
self.client self.client
.patch_lighthouse_validators(&validator.voting_pubkey, Some(enabled), None, None) .patch_lighthouse_validators(&validator.voting_pubkey, Some(enabled), None, None, None)
.await .await
.unwrap(); .unwrap();
@@ -546,7 +547,13 @@ impl ApiTester {
let validator = &self.client.get_lighthouse_validators().await.unwrap().data[index]; let validator = &self.client.get_lighthouse_validators().await.unwrap().data[index];
self.client self.client
.patch_lighthouse_validators(&validator.voting_pubkey, None, Some(gas_limit), None) .patch_lighthouse_validators(
&validator.voting_pubkey,
None,
Some(gas_limit),
None,
None,
)
.await .await
.unwrap(); .unwrap();
@@ -573,6 +580,7 @@ impl ApiTester {
None, None,
None, None,
Some(builder_proposals), Some(builder_proposals),
None,
) )
.await .await
.unwrap(); .unwrap();

View File

@@ -126,6 +126,7 @@ impl ApiTester {
task_executor: executor, task_executor: executor,
api_secret, api_secret,
validator_dir: Some(validator_dir.path().into()), validator_dir: Some(validator_dir.path().into()),
secrets_dir: Some(secrets_dir.path().into()),
validator_store: Some(validator_store.clone()), validator_store: Some(validator_store.clone()),
graffiti_file: None, graffiti_file: None,
graffiti_flag: Some(Graffiti::default()), graffiti_flag: Some(Graffiti::default()),
@@ -135,6 +136,8 @@ impl ApiTester {
listen_addr: IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), listen_addr: IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)),
listen_port: 0, listen_port: 0,
allow_origin: None, allow_origin: None,
allow_keystore_export: true,
store_passwords_in_secrets_dir: false,
}, },
sse_logging_components: None, sse_logging_components: None,
log, log,

View File

@@ -135,6 +135,7 @@ impl ValidatorSpecification {
enabled, enabled,
gas_limit, gas_limit,
builder_proposals, builder_proposals,
None, // Grafitti field is not maintained between validator moves.
) )
.await .await
.map_err(UploadError::PatchValidatorFailed)?; .map_err(UploadError::PatchValidatorFailed)?;

View File

@@ -50,7 +50,7 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
/// Run the account manager, returning an error if the operation did not succeed. /// Run the account manager, returning an error if the operation did not succeed.
pub fn run<'a, T: EthSpec>(matches: &'a ArgMatches<'a>, env: Environment<T>) -> Result<(), String> { pub fn run<'a, T: EthSpec>(matches: &'a ArgMatches<'a>, env: Environment<T>) -> Result<(), String> {
let context = env.core_context(); let context = env.core_context();
let spec = context.eth2_config.spec.clone(); let spec = context.eth2_config.spec;
let dump_config = clap_utils::parse_optional(matches, DUMP_CONFIGS_FLAG)? let dump_config = clap_utils::parse_optional(matches, DUMP_CONFIGS_FLAG)?
.map(DumpConfig::Enabled) .map(DumpConfig::Enabled)
.unwrap_or_else(|| DumpConfig::Disabled); .unwrap_or_else(|| DumpConfig::Disabled);