Bump snap version and tweak importing detection logic (#6079)

* bump last tick just before printing info and restore sync detection

* bump kovan snapshot version

* Fixed sync tests

* Fixed rpc tests
This commit is contained in:
Robert Habermeier
2017-07-18 16:59:33 +02:00
committed by Arkadiy Paronyan
parent d157930f2c
commit 298ea1d748
7 changed files with 18 additions and 17 deletions

View File

@@ -152,7 +152,7 @@ impl InformantData for FullNodeInformantData {
max_peers: status.current_max_peers(net_config.min_peers, net_config.max_peers),
}))
}
_ => (is_major_importing(None, queue_info.clone()), None),
_ => (is_major_importing(self.sync.as_ref().map(|s| s.status().state), queue_info.clone()), None),
};
Report {
@@ -254,8 +254,6 @@ impl<T: InformantData> Informant<T> {
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();
@@ -287,6 +285,8 @@ impl<T: InformantData> Informant<T> {
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,