diff --git a/parity/informant.rs b/parity/informant.rs index 7e1e4ed4d..4c3b4aca2 100644 --- a/parity/informant.rs +++ b/parity/informant.rs @@ -254,21 +254,24 @@ impl Informant { return; } + *self.last_tick.write() = Instant::now(); + + let (client_report, full_report) = { + let mut last_report = self.last_report.lock(); + let full_report = self.target.report(); + let diffed = full_report.client_report.clone() - &*last_report; + *last_report = full_report.client_report.clone(); + (diffed, full_report) + }; + let Report { importing, chain_info, - client_report, queue_info, cache_sizes, sync_info, - } = self.target.report(); - - let client_report = { - let mut last_report = self.last_report.lock(); - let diffed = client_report.clone() - &*last_report; - *last_report = client_report.clone(); - diffed - }; + .. + } = full_report; let rpc_stats = self.rpc_stats.as_ref(); @@ -284,8 +287,6 @@ impl Informant { return; } - *self.last_tick.write() = Instant::now(); - let paint = |c: Style, t: String| match self.with_color && stdout_isatty() { true => format!("{}", c.paint(t)), false => t,