mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Enable lints for tests only running optimized (#6664)
* enable linting optimized-only tests * fix automatically fixable or obvious lints * fix suspicious_open_options by removing manual options * fix `await_holding_lock`s * avoid failing lint due to now disabled `#[cfg(debug_assertions)]` * reduce future sizes in tests * fix accidently flipped assert logic * restore holding lock for web3signer download * Merge branch 'unstable' into lint-opt-tests
This commit is contained in:
@@ -520,7 +520,7 @@ pub mod tests {
|
||||
|
||||
let local_validators: Vec<ValidatorSpecification> = {
|
||||
let contents =
|
||||
fs::read_to_string(&self.import_config.validators_file_path.unwrap())
|
||||
fs::read_to_string(self.import_config.validators_file_path.unwrap())
|
||||
.unwrap();
|
||||
serde_json::from_str(&contents).unwrap()
|
||||
};
|
||||
@@ -557,7 +557,7 @@ pub mod tests {
|
||||
self.vc.ensure_key_cache_consistency().await;
|
||||
|
||||
let local_keystore: Keystore =
|
||||
Keystore::from_json_file(&self.import_config.keystore_file_path.unwrap())
|
||||
Keystore::from_json_file(self.import_config.keystore_file_path.unwrap())
|
||||
.unwrap();
|
||||
|
||||
let list_keystores_response = self.vc.client.get_keystores().await.unwrap().data;
|
||||
|
||||
@@ -978,13 +978,13 @@ mod test {
|
||||
})
|
||||
.unwrap();
|
||||
// Set all definitions to use the same password path as the primary.
|
||||
definitions.iter_mut().enumerate().for_each(|(_, def)| {
|
||||
match &mut def.signing_definition {
|
||||
SigningDefinition::LocalKeystore {
|
||||
voting_keystore_password_path: Some(path),
|
||||
..
|
||||
} => *path = primary_path.clone(),
|
||||
_ => (),
|
||||
definitions.iter_mut().for_each(|def| {
|
||||
if let SigningDefinition::LocalKeystore {
|
||||
voting_keystore_password_path: Some(path),
|
||||
..
|
||||
} = &mut def.signing_definition
|
||||
{
|
||||
*path = primary_path.clone()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user