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

@@ -241,10 +241,7 @@ impl Command for BalanceCommand {
}
fn exec(&self, _args: &[&str], lightclient: &LightClient) -> String {
match lightclient.do_sync(true) {
Ok(_) => format!("{}", lightclient.do_balance().pretty(2)),
Err(e) => e
}
format!("{}", lightclient.do_balance().pretty(2))
}
}
@@ -649,12 +646,7 @@ impl Command for TransactionsCommand {
}
fn exec(&self, _args: &[&str], lightclient: &LightClient) -> String {
match lightclient.do_sync(true) {
Ok(_) => {
format!("{}", lightclient.do_list_transactions().pretty(2))
},
Err(e) => e
}
format!("{}", lightclient.do_list_transactions().pretty(2))
}
}
@@ -680,14 +672,7 @@ impl Command for HeightCommand {
return format!("Didn't understand arguments\n{}", self.help());
}
if args.len() == 0 || (args.len() == 1 && args[0].trim() == "true") {
match lightclient.do_sync(true) {
Ok(_) => format!("{}", object! { "height" => lightclient.last_scanned_height()}.pretty(2)),
Err(e) => e
}
} else {
format!("{}", object! { "height" => lightclient.last_scanned_height()}.pretty(2))
}
format!("{}", object! { "height" => lightclient.last_scanned_height()}.pretty(2))
}
}
@@ -785,12 +770,7 @@ impl Command for NotesCommand {
false
};
match lightclient.do_sync(true) {
Ok(_) => {
format!("{}", lightclient.do_list_notes(all_notes).pretty(2))
},
Err(e) => e
}
format!("{}", lightclient.do_list_notes(all_notes).pretty(2))
}
}