upstream updates

This commit is contained in:
DenioD
2020-05-09 10:34:33 +02:00
parent d3a66550ed
commit 84b1b75f2c
11 changed files with 140 additions and 73 deletions

View File

@@ -4,6 +4,7 @@ use silentdragonlite_cli::{configure_clapapp,
startup,
start_interactive,
attempt_recover_seed};
//version::VERSION
use log::error;
pub fn main() {
@@ -12,9 +13,10 @@ pub fn main() {
let fresh_app = App::new("SilentDragonLite CLI");
let configured_app = configure_clapapp!(fresh_app);
let matches = configured_app.get_matches();
if matches.is_present("recover") {
// Create a Light Client Config in an attempt to recover the file.
attempt_recover_seed();
attempt_recover_seed(matches.value_of("password").map(|s| s.to_string()));
return;
}
@@ -54,8 +56,9 @@ pub fn main() {
let (command_tx, resp_rx) = match startup(server, dangerous, seed, birthday, !nosync, command.is_none()) {
Ok(c) => c,
Err(e) => {
eprintln!("Error during startup: {}", e);
error!("Error during startup: {}", e);
let emsg = format!("Error during startup:{}\nIf you repeatedly run into this issue, you might have to restore your wallet from your seed phrase.", e);
eprintln!("{}", emsg);
error!("{}", emsg);
if cfg!(target_os = "unix" ) {
match e.raw_os_error() {
Some(13) => report_permission_error(),