mirror of
https://github.com/Qortal/piratewallet-light-cli.git
synced 2025-07-30 20:01:26 +00:00
Add syncstatus command
This commit is contained in:
@@ -221,7 +221,12 @@ fn startup(server: http::Uri, dangerous: bool, seed: Option<String>, birthday: u
|
||||
if first_sync {
|
||||
let update = lightclient.do_sync(true);
|
||||
if print_updates {
|
||||
println!("{}", update);
|
||||
match update {
|
||||
Ok(j) => {
|
||||
println!("{}", j.pretty(2));
|
||||
},
|
||||
Err(e) => println!("{}", e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -329,7 +334,11 @@ fn command_loop(lightclient: Arc<LightClient>) -> (Sender<(String, Vec<String>)>
|
||||
Err(_) => {
|
||||
// Timeout. Do a sync to keep the wallet up-to-date. False to whether to print updates on the console
|
||||
info!("Timeout, doing a sync");
|
||||
lc.do_sync(false);
|
||||
match lc.do_sync(false) {
|
||||
Ok(_) => {},
|
||||
Err(e) => {error!("{}", e)}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user