mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 07:41:08 +00:00
Prepare syncing for parallel sync strategies (#3224)
This PR should supersede https://github.com/paritytech/polkadot-sdk/pull/2814 and accomplish the same with less changes. It's needed to run sync strategies in parallel, like running `ChainSync` and `GapSync` as independent strategies, and running `ChainSync` and Sync 2.0 alongside each other. The difference with https://github.com/paritytech/polkadot-sdk/pull/2814 is that we allow simultaneous requests to remote peers initiated by different strategies, as this is not tracked on the remote node in any way. Therefore, `PeerPool` is not needed. CC @skunert --------- Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
This commit is contained in:
@@ -330,11 +330,6 @@ impl<B: BlockT> StateStrategy<B> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Get the number of peers known to syncing.
|
||||
pub fn num_peers(&self) -> usize {
|
||||
self.peers.len()
|
||||
}
|
||||
|
||||
/// Get actions that should be performed by the owner on [`WarpSync`]'s behalf
|
||||
#[must_use]
|
||||
pub fn actions(&mut self) -> impl Iterator<Item = StateStrategyAction<B>> {
|
||||
|
||||
Reference in New Issue
Block a user