Improve logging
This commit is contained in:
@@ -677,6 +677,7 @@ impl LightClient {
|
|||||||
|
|
||||||
// If there's nothing to scan, just return
|
// If there's nothing to scan, just return
|
||||||
if last_scanned_height == latest_block {
|
if last_scanned_height == latest_block {
|
||||||
|
info!("Nothing to sync, returning");
|
||||||
return "".to_string();
|
return "".to_string();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -691,6 +692,7 @@ impl LightClient {
|
|||||||
let local_bytes_downloaded = bytes_downloaded.clone();
|
let local_bytes_downloaded = bytes_downloaded.clone();
|
||||||
|
|
||||||
let start_height = last_scanned_height + 1;
|
let start_height = last_scanned_height + 1;
|
||||||
|
info!("Start height is {}", start_height);
|
||||||
|
|
||||||
// Show updates only if we're syncing a lot of blocks
|
// Show updates only if we're syncing a lot of blocks
|
||||||
if print_updates && end_height - start_height > 100 {
|
if print_updates && end_height - start_height > 100 {
|
||||||
|
|||||||
@@ -126,6 +126,7 @@ pub fn main() {
|
|||||||
},
|
},
|
||||||
Err(_) => {
|
Err(_) => {
|
||||||
// Timeout. Do a sync to keep the wallet up-to-date. False to whether to print updates on the console
|
// 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);
|
lc.do_sync(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user