This commit is contained in:
Aditya Kulkarni
2019-09-06 14:25:14 -07:00
parent 48d305c406
commit d308772965
3 changed files with 20 additions and 5 deletions

View File

@@ -16,6 +16,7 @@ pub mod grpc_client {
pub fn main() {
println!("Starting Light Client");
let mut lightclient = LightClient::new();
// At startup, read the wallet.dat
@@ -23,11 +24,12 @@ pub fn main() {
// `()` can be used when no completer is required
let mut rl = Editor::<()>::new();
if rl.load_history("history.txt").is_err() {
println!("No previous history.");
}
let _ = rl.load_history("history.txt");
println!("Ready!");
loop {
let readline = rl.readline(&format!("Block:{} (h for help) >> ", lightclient.last_scanned_height()));
let readline = rl.readline(&format!("Block:{} (type 'help') >> ", lightclient.last_scanned_height()));
match readline {
Ok(line) => {
rl.add_history_entry(line.as_str());