Fixed a couple of syncing issues (#5277)

* Don't queue duplicate blocks

* Keep queue_blocks on restart
This commit is contained in:
Arkadiy Paronyan
2020-03-19 14:02:07 +01:00
committed by GitHub
parent cfa179f2ce
commit a66615446d
5 changed files with 84 additions and 20 deletions
+5
View File
@@ -375,6 +375,11 @@ impl<B: BlockT + 'static, H: ExHashT> NetworkWorker<B, H> {
self.network_service.user_protocol().num_queued_blocks()
}
/// Returns the number of processed blocks.
pub fn num_processed_blocks(&self) -> usize {
self.network_service.user_protocol().num_processed_blocks()
}
/// Number of active sync requests.
pub fn num_sync_requests(&self) -> usize {
self.network_service.user_protocol().num_sync_requests()