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

Commit 791f59c

Browse files
committed
parity: print correct keys path on startup (#9501)
1 parent c871fc5 commit 791f59c

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

parity/run.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ fn execute_light_impl(cmd: RunCmd, logger: Arc<RotatingLogger>) -> Result<Runnin
215215
cmd.dirs.create_dirs(cmd.dapps_conf.enabled, cmd.ui_conf.enabled, cmd.secretstore_conf.enabled)?;
216216

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

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

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

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

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

1036-
fn print_running_environment(spec_name: &String, dirs: &Directories, db_dirs: &DatabaseDirectories, dapps_conf: &dapps::Configuration) {
1036+
fn print_running_environment(data_dir: &str, dirs: &Directories, db_dirs: &DatabaseDirectories, dapps_conf: &dapps::Configuration) {
10371037
info!("Starting {}", Colour::White.bold().paint(version()));
1038-
info!("Keys path {}", Colour::White.bold().paint(dirs.keys_path(spec_name).to_string_lossy().into_owned()));
1038+
info!("Keys path {}", Colour::White.bold().paint(dirs.keys_path(data_dir).to_string_lossy().into_owned()));
10391039
info!("DB path {}", Colour::White.bold().paint(db_dirs.db_root_path().to_string_lossy().into_owned()));
10401040
info!("Path to dapps {}", Colour::White.bold().paint(dapps_conf.dapps_path.to_string_lossy().into_owned()));
10411041
}

util/dir/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,9 @@ impl Directories {
130130
}
131131

132132
/// Get the keys path
133-
pub fn keys_path(&self, spec_name: &str) -> PathBuf {
133+
pub fn keys_path(&self, data_dir: &str) -> PathBuf {
134134
let mut dir = PathBuf::from(&self.keys);
135-
dir.push(spec_name);
135+
dir.push(data_dir);
136136
dir
137137
}
138138
}

0 commit comments

Comments
 (0)