Warn if server is behind

This commit is contained in:
Aditya Kulkarni 2019-10-09 15:04:53 -07:00
parent 0db5423927
commit 7016280d1c

View File

@ -569,6 +569,12 @@ impl LightClient {
});
let latest_block = latest_block_height.load(Ordering::SeqCst);
if latest_block < last_scanned_height {
let w = format!("Server's latest block({}) is behind ours({})", latest_block, last_scanned_height);
warn!("{}", w);
return w;
}
info!("Latest block is {}", latest_block);
// Get the end height to scan to.