Skip to content
Permalink
Browse files

Collators get incoming parachain messages (#149)

* refactor out a consensus data fetcher from table router

* move statement checking logic into router

* refuse to start authority if collator

* support building the table router asynchronously

* instantiate_consensus does not overwrite old

* update key in new consensus if there was none before

* collator collects ingress from network

* test produced egress roots

* fix adder-collator compilation

* address first grumbles

* integrate new gossip with collator network launch

* address review
  • Loading branch information...
rphmeier committed Mar 21, 2019
1 parent c12969e commit e9402a6c5f20d36bece29df2c05fe0d73d544ab8

Some generated files are not rendered by default. Learn more.

@@ -45,6 +45,7 @@ pub use service::{

pub use cli::{VersionInfo, IntoExit};
pub use cli::error;
pub use tokio::runtime::TaskExecutor;

fn load_spec(id: &str) -> Result<Option<service::ChainSpec>, String> {
Ok(match ChainSpec::from(id) {
@@ -68,7 +69,7 @@ pub trait Worker: IntoExit {
fn configuration(&self) -> service::CustomConfiguration { Default::default() }

/// Do work and schedule exit.
fn work<S: PolkadotService>(self, service: &S) -> Self::Work;
fn work<S: PolkadotService>(self, service: &S, executor: TaskExecutor) -> Self::Work;
}

/// Parse command line arguments into service configuration.
@@ -129,7 +130,7 @@ fn run_until_exit<T, C, W>(
let executor = runtime.executor();
cli::informant::start(&service, exit.clone(), executor.clone());

let _ = runtime.block_on(worker.work(&*service));
let _ = runtime.block_on(worker.work(&*service, executor.clone()));
exit_send.fire();

// we eagerly drop the service so that the internal exit future is fired,
@@ -12,5 +12,10 @@ substrate-primitives = { git = "https://github.com/paritytech/substrate" }
polkadot-runtime = { path = "../runtime", version = "0.1" }
polkadot-primitives = { path = "../primitives", version = "0.1" }
polkadot-cli = { path = "../cli" }
polkadot-network = { path = "../network" }
polkadot-validation = { path = "../validation" }
log = "0.4"
tokio = "0.1.7"

[dev-dependencies]
substrate-keyring = { git = "https://github.com/paritytech/substrate" }

0 comments on commit e9402a6

Please sign in to comment.
You can’t perform that action at this time.