mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-22 14:24:44 +00:00
Fix clippy lints
This commit is contained in:
@@ -173,6 +173,7 @@ impl ApiTester {
|
||||
|
||||
/// Checks that the key cache exists and can be decrypted with the current
|
||||
/// set of known validators.
|
||||
#[allow(clippy::await_holding_lock)] // This is a test, so it should be fine.
|
||||
pub async fn ensure_key_cache_consistency(&self) {
|
||||
assert!(
|
||||
self.validator_dir.as_ref().join(CACHE_FILENAME).exists(),
|
||||
@@ -180,6 +181,7 @@ impl ApiTester {
|
||||
);
|
||||
let key_cache =
|
||||
KeyCache::open_or_create(self.validator_dir.as_ref()).expect("should open a key cache");
|
||||
|
||||
self.initialized_validators
|
||||
.read()
|
||||
.decrypt_key_cache(key_cache, &mut <_>::default(), OnDecryptFailure::Error)
|
||||
|
||||
@@ -47,6 +47,12 @@ pub struct KeyCache {
|
||||
|
||||
type SerializedKeyMap = HashMap<Uuid, ZeroizeHash>;
|
||||
|
||||
impl Default for KeyCache {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl KeyCache {
|
||||
pub fn new() -> Self {
|
||||
KeyCache {
|
||||
|
||||
Reference in New Issue
Block a user