mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-03 13:27:23 +00:00
Refactor Sync status updates into a stream of updates (#1858)
* refactor sync provider * relative use of interval * typo * set propagate timeout to 2500ms * address comments * fix instant calc * update intervals
This commit is contained in:
committed by
Gav Wood
parent
828cd9580a
commit
a81f7f48a0
@@ -109,10 +109,9 @@ impl<B: traits::Block> SystemApi<B::Hash, <B::Header as HeaderT>::Number> for Sy
|
||||
}
|
||||
|
||||
fn system_health(&self) -> Result<Health> {
|
||||
let status = self.sync.status();
|
||||
Ok(Health {
|
||||
peers: status.num_peers,
|
||||
is_syncing: status.sync.is_major_syncing(),
|
||||
peers: self.sync.peers().len(),
|
||||
is_syncing: self.sync.is_major_syncing(),
|
||||
should_have_peers: self.should_have_peers,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user