mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 22:37:57 +00:00
Move requests-responses and polling from ChainSync to SyncingEngine (#1650)
Move request-response handling from `ChainSync` to `SyncingEngine` as part of [Sync 2.0](https://github.com/paritytech/polkadot-sdk/issues/534) refactoring aimed at making `ChainSync` a pure state machine. Resolves https://github.com/paritytech/polkadot-sdk/issues/502. --------- Co-authored-by: Aaro Altonen <48052676+altonen@users.noreply.github.com> Co-authored-by: Bastian Köcher <git@kchr.de>
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
|
||||
use crate::block_relay_protocol::{BlockDownloader as BlockDownloaderT, BlockResponseError};
|
||||
|
||||
use futures::{channel::oneshot, task::Poll};
|
||||
use futures::channel::oneshot;
|
||||
use libp2p::PeerId;
|
||||
use sc_network::RequestFailure;
|
||||
use sc_network_common::sync::{
|
||||
@@ -39,7 +39,6 @@ mockall::mock! {
|
||||
fn num_sync_requests(&self) -> usize;
|
||||
fn num_downloaded_blocks(&self) -> usize;
|
||||
fn num_peers(&self) -> usize;
|
||||
fn num_active_peers(&self) -> usize;
|
||||
fn new_peer(
|
||||
&mut self,
|
||||
who: PeerId,
|
||||
@@ -81,15 +80,6 @@ mockall::mock! {
|
||||
);
|
||||
fn peer_disconnected(&mut self, who: &PeerId);
|
||||
fn metrics(&self) -> Metrics;
|
||||
fn poll<'a>(
|
||||
&mut self,
|
||||
cx: &mut std::task::Context<'a>,
|
||||
) -> Poll<()>;
|
||||
fn send_block_request(
|
||||
&mut self,
|
||||
who: PeerId,
|
||||
request: BlockRequest<Block>,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user