Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
231 changes: 132 additions & 99 deletions Cargo.lock

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions collator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ use polkadot_cli::{
Worker, IntoExit, ProvideRuntimeApi, AbstractService, CustomConfiguration, ParachainHost,
};
use polkadot_network::validation::{LeafWorkParams, ValidationNetwork};
use polkadot_network::{PolkadotNetworkService, PolkadotProtocol};
use polkadot_network::PolkadotProtocol;
use polkadot_runtime::RuntimeApi;

pub use polkadot_cli::VersionInfo;
Expand All @@ -90,7 +90,7 @@ pub trait Network: Send + Sync {
fn checked_statements(&self, relay_parent: Hash) -> Box<dyn Stream<Item=SignedStatement>>;
}

impl<P, E, SP> Network for ValidationNetwork<P, E, PolkadotNetworkService, SP> where
impl<P, E, SP> Network for ValidationNetwork<P, E, SP> where
P: 'static + Send + Sync,
E: 'static + Send + Sync,
SP: 'static + Spawn + Clone + Send + Sync,
Expand Down Expand Up @@ -231,7 +231,7 @@ pub async fn collate<R, P>(

/// Polkadot-api context.
struct ApiContext<P, E, SP> {
network: Arc<ValidationNetwork<P, E, PolkadotNetworkService, SP>>,
network: Arc<ValidationNetwork<P, E, SP>>,
parent_hash: Hash,
validators: Vec<ValidatorId>,
}
Expand Down Expand Up @@ -347,12 +347,12 @@ impl<P, E> Worker for CollationNode<P, E> where
let message_validator = polkadot_network::gossip::register_validator(
network.clone(),
(is_known, client.clone()),
&spawner
);

let validation_network = Arc::new(ValidationNetwork::new(
network.clone(),
exit.clone(),
message_validator,
exit.clone(),
client.clone(),
spawner.clone(),
));
Expand Down
1 change: 1 addition & 0 deletions network/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ polkadot-primitives = { path = "../primitives" }
polkadot-erasure-coding = { path = "../erasure-coding" }
codec = { package = "parity-scale-codec", version = "1.1.0", default-features = false, features = ["derive"] }
sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
sc-network-gossip = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
futures = "0.3.1"
Expand Down
Loading