Remove NetworkSpecialization (#4665)

* remove networkspecialization

* Fix most of the fallout

* get all tests compiling

Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
This commit is contained in:
Robert HabermeierandPierre Krieger authored and GitHub committed 2020-02-21 14:02:12 +01:00
1 parent e8000e7429
commit 0090fe979b
20 files changed
+136 -503

No files matched your search

@@ -120,9 +120,8 @@ pub trait Network<Block: BlockT>: GossipNetwork<Block> + Clone + Send + 'static
fn set_sync_fork_request(&self, peers: Vec<sc_network::PeerId>, hash: Block::Hash, number: NumberFor<Block>);
}
impl<B, S, H> Network<B> for Arc<NetworkService<B, S, H>> where
impl<B, H> Network<B> for Arc<NetworkService<B, H>> where
B: BlockT,
S: sc_network::specialization::NetworkSpecialization<B>,
H: sc_network::ExHashT,
{
fn set_sync_fork_request(&self, peers: Vec<sc_network::PeerId>, hash: B::Hash, number: NumberFor<B>) {
@@ -19,7 +19,7 @@
use super::*;
use environment::HasVoted;
use sc_network_test::{
Block, DummySpecialization, Hash, TestNetFactory, BlockImportAdapter, Peer,
Block, Hash, TestNetFactory, BlockImportAdapter, Peer,
PeersClient, PassThroughVerifier,
};
use sc_network::config::{ProtocolConfig, Roles, BoxFinalityProofRequestBuilder};
@@ -68,7 +68,7 @@ type PeerData =
>
>
>;
type GrandpaPeer = Peer<PeerData, DummySpecialization>;
type GrandpaPeer = Peer<PeerData>;
struct GrandpaTestNet {
peers: Vec<GrandpaPeer>,
@@ -90,7 +90,6 @@ impl GrandpaTestNet {
}
impl TestNetFactory for GrandpaTestNet {
type Specialization = DummySpecialization;
type Verifier = PassThroughVerifier;
type PeerData = PeerData;