mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-23 01:31:07 +00:00
Introduce ChainSyncInterface (#12489)
* Introduce `ChainSyncInterface` `ChainSyncInterface` provides an asynchronous interface for other subsystems to submit calls to `ChainSync`. This allows `NetworkService` to delegate calls to `ChainSync` while still providing the same API for other subsystems (for now). This makes it possible to move the syncing code in piecemeal fashion out of `protocol.rs` as the calls are just forwarded to `ChainSync`. * Apply review comments * Fix tests
This commit is contained in:
@@ -114,5 +114,9 @@ mockall::mock! {
|
||||
) -> Result<Vec<BlockData<Block>>, String>;
|
||||
fn encode_state_request(&self, request: &OpaqueStateRequest) -> Result<Vec<u8>, String>;
|
||||
fn decode_state_response(&self, response: &[u8]) -> Result<OpaqueStateResponse, String>;
|
||||
fn poll<'a>(
|
||||
&mut self,
|
||||
cx: &mut std::task::Context<'a>,
|
||||
) -> Poll<PollBlockAnnounceValidation<Block::Header>>;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user