mirror of
https://github.com/Qortal/piratewallet-light-cli.git
synced 2025-07-30 20:01:26 +00:00
Sync before height command
This commit is contained in:
@@ -627,10 +627,13 @@ impl Command for HeightCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn exec(&self, _args: &[&str], lightclient: &LightClient) -> String {
|
fn exec(&self, _args: &[&str], lightclient: &LightClient) -> String {
|
||||||
format!("{}",
|
match lightclient.do_sync(true) {
|
||||||
object! {
|
Ok(_) => format!("{}",
|
||||||
"height" => lightclient.last_scanned_height()
|
object! {
|
||||||
}.pretty(2))
|
"height" => lightclient.last_scanned_height()
|
||||||
|
}.pretty(2)),
|
||||||
|
Err(e) => e
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user