mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Misc. dependency cleanup (#6810)
* remove ensure_dir_exists (2 deps saved) * group UNHANDLED_ERRORs into a generic (2 deps saved) * Introduce separate `health_metrics` crate * separate health_metrics crate * remove metrics from warp_utils * move ProcessHealth::observe and SystemHealth::observe to health_metrics * fix errors * nitpick `Cargo.toml`s --------- Co-authored-by: Daniel Knopik <daniel@dknopik.de> # Conflicts: # Cargo.toml
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
use crate::{Error as DirError, ValidatorDir};
|
||||
use bls::get_withdrawal_credentials;
|
||||
use deposit_contract::{encode_eth1_tx_data, Error as DepositError};
|
||||
use directory::ensure_dir_exists;
|
||||
use eth2_keystore::{Error as KeystoreError, Keystore, KeystoreBuilder, PlainText};
|
||||
use filesystem::create_with_600_perms;
|
||||
use rand::{distributions::Alphanumeric, Rng};
|
||||
@@ -42,7 +41,7 @@ pub enum Error {
|
||||
#[cfg(feature = "insecure_keys")]
|
||||
InsecureKeysError(String),
|
||||
MissingPasswordDir,
|
||||
UnableToCreatePasswordDir(String),
|
||||
UnableToCreatePasswordDir(io::Error),
|
||||
}
|
||||
|
||||
impl From<KeystoreError> for Error {
|
||||
@@ -163,7 +162,7 @@ impl<'a> Builder<'a> {
|
||||
}
|
||||
|
||||
if let Some(password_dir) = &self.password_dir {
|
||||
ensure_dir_exists(password_dir).map_err(Error::UnableToCreatePasswordDir)?;
|
||||
create_dir_all(password_dir).map_err(Error::UnableToCreatePasswordDir)?;
|
||||
}
|
||||
|
||||
// The withdrawal keystore must be initialized in order to store it or create an eth1
|
||||
|
||||
Reference in New Issue
Block a user