mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 22:47:56 +00:00
Move DummySpecialization to sc-network (#4680)
This commit is contained in:
committed by
Gavin Wood
parent
96cd57a695
commit
4e0ac574e2
@@ -62,6 +62,7 @@ use substrate_test_runtime_client::{self, AccountKeyring};
|
||||
|
||||
pub use substrate_test_runtime_client::runtime::{Block, Extrinsic, Hash, Transfer};
|
||||
pub use substrate_test_runtime_client::{TestClient, TestClientBuilder, TestClientBuilderExt};
|
||||
pub use sc_network::specialization::DummySpecialization;
|
||||
|
||||
type AuthorityId = sp_consensus_babe::AuthorityId;
|
||||
|
||||
@@ -101,32 +102,6 @@ impl<B: BlockT> Verifier<B> for PassThroughVerifier {
|
||||
}
|
||||
}
|
||||
|
||||
/// The test specialization.
|
||||
#[derive(Clone)]
|
||||
pub struct DummySpecialization;
|
||||
|
||||
impl NetworkSpecialization<Block> for DummySpecialization {
|
||||
fn status(&self) -> Vec<u8> {
|
||||
vec![]
|
||||
}
|
||||
|
||||
fn on_connect(
|
||||
&mut self,
|
||||
_ctx: &mut dyn Context<Block>,
|
||||
_peer_id: PeerId,
|
||||
_status: sc_network::message::Status<Block>
|
||||
) {}
|
||||
|
||||
fn on_disconnect(&mut self, _ctx: &mut dyn Context<Block>, _peer_id: PeerId) {}
|
||||
|
||||
fn on_message(
|
||||
&mut self,
|
||||
_ctx: &mut dyn Context<Block>,
|
||||
_peer_id: PeerId,
|
||||
_message: Vec<u8>,
|
||||
) {}
|
||||
}
|
||||
|
||||
pub type PeersFullClient =
|
||||
sc_client::Client<substrate_test_runtime_client::Backend, substrate_test_runtime_client::Executor, Block, substrate_test_runtime_client::runtime::RuntimeApi>;
|
||||
pub type PeersLightClient =
|
||||
|
||||
Reference in New Issue
Block a user