mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-21 14:25:41 +00:00
Prioritize new blocks over old forks when syncing (#4414)
* Prioritize new blocks over old forks when syncing * Fixed some test cases
This commit is contained in:
committed by
Gavin Wood
parent
6d8b99cf5e
commit
6e572a9477
@@ -319,6 +319,11 @@ impl<B: BlockT + 'static, S: NetworkSpecialization<B>, H: ExHashT> NetworkWorker
|
||||
self.network_service.user_protocol().num_queued_blocks()
|
||||
}
|
||||
|
||||
/// Number of active sync requests.
|
||||
pub fn num_sync_requests(&self) -> usize {
|
||||
self.network_service.user_protocol().num_sync_requests()
|
||||
}
|
||||
|
||||
/// Adds an address for a node.
|
||||
pub fn add_known_address(&mut self, peer_id: PeerId, addr: Multiaddr) {
|
||||
self.network_service.add_known_address(peer_id, addr);
|
||||
|
||||
Reference in New Issue
Block a user