Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
parity: print correct keys path on startup (#9501)
Browse files Browse the repository at this point in the history
  • Loading branch information
5chdn committed Sep 8, 2018
1 parent c871fc5 commit 791f59c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions parity/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ fn execute_light_impl(cmd: RunCmd, logger: Arc<RotatingLogger>) -> Result<Runnin
cmd.dirs.create_dirs(cmd.dapps_conf.enabled, cmd.ui_conf.enabled, cmd.secretstore_conf.enabled)?;

//print out running parity environment
print_running_environment(&spec.name, &cmd.dirs, &db_dirs, &cmd.dapps_conf);
print_running_environment(&spec.data_dir, &cmd.dirs, &db_dirs, &cmd.dapps_conf);

info!("Running in experimental {} mode.", Colour::Blue.bold().paint("Light Client"));

Expand Down Expand Up @@ -475,7 +475,7 @@ fn execute_impl<Cr, Rr>(cmd: RunCmd, logger: Arc<RotatingLogger>, on_client_rq:
}

//print out running parity environment
print_running_environment(&spec.name, &cmd.dirs, &db_dirs, &cmd.dapps_conf);
print_running_environment(&spec.data_dir, &cmd.dirs, &db_dirs, &cmd.dapps_conf);

// display info about used pruning algorithm
info!("State DB configuration: {}{}{}",
Expand Down Expand Up @@ -1033,9 +1033,9 @@ fn daemonize(_pid_file: String) -> Result<(), String> {
Err("daemon is no supported on windows".into())
}

fn print_running_environment(spec_name: &String, dirs: &Directories, db_dirs: &DatabaseDirectories, dapps_conf: &dapps::Configuration) {
fn print_running_environment(data_dir: &str, dirs: &Directories, db_dirs: &DatabaseDirectories, dapps_conf: &dapps::Configuration) {
info!("Starting {}", Colour::White.bold().paint(version()));
info!("Keys path {}", Colour::White.bold().paint(dirs.keys_path(spec_name).to_string_lossy().into_owned()));
info!("Keys path {}", Colour::White.bold().paint(dirs.keys_path(data_dir).to_string_lossy().into_owned()));
info!("DB path {}", Colour::White.bold().paint(db_dirs.db_root_path().to_string_lossy().into_owned()));
info!("Path to dapps {}", Colour::White.bold().paint(dapps_conf.dapps_path.to_string_lossy().into_owned()));
}
Expand Down
4 changes: 2 additions & 2 deletions util/dir/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ impl Directories {
}

/// Get the keys path
pub fn keys_path(&self, spec_name: &str) -> PathBuf {
pub fn keys_path(&self, data_dir: &str) -> PathBuf {
let mut dir = PathBuf::from(&self.keys);
dir.push(spec_name);
dir.push(data_dir);
dir
}
}
Expand Down

0 comments on commit 791f59c

Please sign in to comment.