mirror of
https://github.com/mimblewimble/grin.git
synced 2025-05-03 15:51:14 +03:00
Fix rare panic in TUI (#3294)
This commit is contained in:
parent
e76dda6676
commit
cf128eb220
1 changed files with 1 additions and 1 deletions
|
@ -69,7 +69,7 @@ impl TUIStatusView {
|
||||||
format!("Sync step 2/7: Downloading {}(MB) chain state for state sync: {}% at {:.1?}(kB/s)",
|
format!("Sync step 2/7: Downloading {}(MB) chain state for state sync: {}% at {:.1?}(kB/s)",
|
||||||
total_size / 1_000_000,
|
total_size / 1_000_000,
|
||||||
percent,
|
percent,
|
||||||
if dur_ms > 1.0f64 { (downloaded_size - prev_downloaded_size) as f64 / dur_ms as f64 } else { 0f64 },
|
if dur_ms > 1.0f64 { downloaded_size.saturating_sub(prev_downloaded_size) as f64 / dur_ms as f64 } else { 0f64 },
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
let start = start_time.timestamp_millis();
|
let start = start_time.timestamp_millis();
|
||||||
|
|
Loading…
Add table
Reference in a new issue