mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-08 01:05:47 +00:00
Add decimals display to notifier sync speed (#678)
This commit is contained in:
@@ -162,10 +162,10 @@ fn sync_rate_pretty(slots_since_last_update: Slot, update_interval_secs: u64) ->
|
|||||||
if slots_since_last_update == 0 {
|
if slots_since_last_update == 0 {
|
||||||
"No progress".into()
|
"No progress".into()
|
||||||
} else {
|
} else {
|
||||||
format!(
|
let distance = f64::from(slots_since_last_update.as_u64() as u32);
|
||||||
"{} slots/sec",
|
let time = f64::from(update_interval_secs as u32);
|
||||||
slots_since_last_update / update_interval_secs
|
|
||||||
)
|
format!("{:.2} slots/sec", distance / time)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user