Refactor to use only chain info (#4516)

This commit is contained in:
Nikolay Volf
2020-01-02 14:46:07 +03:00
committed by Bastian Köcher
parent 8ecc450fd9
commit 6d06a19f41
30 changed files with 178 additions and 175 deletions
+2 -2
View File
@@ -35,14 +35,14 @@ pub fn build(service: &impl AbstractService) -> impl futures::Future<Output = ()
.network_status(Duration::from_millis(5000))
.compat()
.try_for_each(move |(net_status, _)| {
let info = client.info();
let info = client.usage_info();
display.display(&info, net_status);
future::ok(())
});
let client = service.client();
let mut last_best = {
let info = client.info();
let info = client.usage_info();
Some((info.chain.best_number, info.chain.best_hash))
};