Skip to content

Commit d041afa

Browse files
committed
Don't report an ETA when the progress is 0
1 parent 41f2ada commit d041afa

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/util/bitcoincore_ext.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,11 @@ pub trait RpcApiExt: RpcApi {
7777
Some(ScanningDetails::Scanning { progress, duration }) => {
7878
let duration = duration as u64;
7979
let progress_n = progress as f32;
80-
let eta = (duration as f32 / progress_n) as u64 - duration;
80+
let eta = if progress_n > 0.0 {
81+
(duration as f32 / progress_n) as u64 - duration
82+
} else {
83+
0
84+
};
8185

8286
info!(target: "bwt",
8387
"waiting for bitcoind to finish scanning [done {:.1}%, running for {}m, eta {}m]",

0 commit comments

Comments
 (0)