diff --git a/substrate/Cargo.lock b/substrate/Cargo.lock index 1e31aea13eb28bc2f417e3a688c13da19c4d1d93..8f333b159e504819a2fdd0597177f755be37b4a2 100644 --- a/substrate/Cargo.lock +++ b/substrate/Cargo.lock @@ -1090,6 +1090,7 @@ name = "polkadot-validator" version = "0.1.0" dependencies = [ "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "polkadot-primitives 0.1.0", "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-primitives 0.1.0", "substrate-serializer 0.1.0", @@ -1431,6 +1432,7 @@ dependencies = [ "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "native-runtime 0.1.0", "parity-wasm 0.15.4 (registry+https://github.com/rust-lang/crates.io-index)", + "polkadot-primitives 0.1.0", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/substrate/client/src/genesis.rs b/substrate/client/src/genesis.rs index 5a48f947dd263a3e5ac695fd67b22879551b50f2..788513ffa64c36440392335ed3b66d3c59e6b385 100644 --- a/substrate/client/src/genesis.rs +++ b/substrate/client/src/genesis.rs @@ -17,7 +17,7 @@ //! Tool for creating the genesis block. use std::collections::HashMap; -use primitives::{Block, Header}; +use polkadot_primitives::{Block, Header}; use triehash::trie_root; /// Create a genesis block, given the initial storage. diff --git a/substrate/executor/Cargo.toml b/substrate/executor/Cargo.toml index 577b23724077a5ec92f8ff35d3051333658662c5..8d2643d585c15b032fc41b17b3b55aaefc453124 100644 --- a/substrate/executor/Cargo.toml +++ b/substrate/executor/Cargo.toml @@ -10,7 +10,6 @@ substrate-runtime-io = { path = "../runtime-io" } substrate-primitives = { path = "../primitives" } substrate-serializer = { path = "../serializer" } substrate-state-machine = { path = "../state-machine" } -native-runtime = { path = "../native-runtime" } ed25519 = { path = "../ed25519" } serde = "1.0" serde_derive = "1.0" @@ -20,6 +19,9 @@ rustc-hex = "1.0.0" triehash = "0.1.0" hex-literal = "0.1.0" log = "0.3" +# TODO: Remove these and split out tests and a concrete executor. +native-runtime = { path = "../native-runtime" } +polkadot-primitives = { path = "../polkadot-primitives" } [dev-dependencies] assert_matches = "1.1" diff --git a/substrate/executor/src/lib.rs b/substrate/executor/src/lib.rs index e324bdf1119235de5dafa3476a8bcda4e666b0fe..88c52c9389f8ea334dd59b36deeaf038621e6963 100644 --- a/substrate/executor/src/lib.rs +++ b/substrate/executor/src/lib.rs @@ -38,10 +38,13 @@ extern crate serde; extern crate parity_wasm; extern crate byteorder; extern crate rustc_hex; -extern crate native_runtime; extern crate triehash; #[macro_use] extern crate log; +// TODO: Remove and split out into polkadot-specific crate. +extern crate native_runtime; +extern crate polkadot_primitives; + #[cfg(test)] #[macro_use] extern crate hex_literal; diff --git a/substrate/network/src/blocks.rs b/substrate/network/src/blocks.rs index 5b9ca9f6a57fefbbb48a1e6f0a8c24232de6aba4..8d0118222be0e8602d408ae1fa047f24ffa2c76d 100644 --- a/substrate/network/src/blocks.rs +++ b/substrate/network/src/blocks.rs @@ -190,7 +190,7 @@ impl BlockCollection { mod test { use super::{BlockCollection, BlockData}; use message; - use primitives::HeaderHash; + use primitives::block::HeaderHash; fn is_empty(bc: &BlockCollection) -> bool { bc.blocks.is_empty() && diff --git a/substrate/validator/Cargo.toml b/substrate/validator/Cargo.toml index 64bb00118a2ea72e1dce9b1ecdeb15c104be98e3..a95f6798ae02fa2e4ea11971f21e288028df2106 100644 --- a/substrate/validator/Cargo.toml +++ b/substrate/validator/Cargo.toml @@ -6,5 +6,6 @@ authors = ["Parity Technologies <admin@parity.io>"] [dependencies] error-chain = "0.11" substrate-primitives = { path = "../primitives" } +polkadot-primitives = { path = "../polkadot-primitives" } substrate-serializer = { path = "../serializer" } serde = "1.0" diff --git a/substrate/validator/src/lib.rs b/substrate/validator/src/lib.rs index 44192f932791f19e65a86411e87885cb3d436f6c..dc139e77d5b826d195672b12dd934e3b2bcc65d6 100644 --- a/substrate/validator/src/lib.rs +++ b/substrate/validator/src/lib.rs @@ -20,6 +20,7 @@ extern crate substrate_primitives as primitives; extern crate substrate_serializer as serializer; +extern crate polkadot_primitives; extern crate serde; #[macro_use] diff --git a/substrate/validator/src/parachains.rs b/substrate/validator/src/parachains.rs index 5adfe704c7f75b68128548e850c6d4932a020800..67ba56ed1f84c0443fc8bf553cde477086d7edc9 100644 --- a/substrate/validator/src/parachains.rs +++ b/substrate/validator/src/parachains.rs @@ -16,7 +16,7 @@ use std::fmt; -use primitives::validator; +use polkadot_primitives::validator; use serde::de::DeserializeOwned; use error::Result; diff --git a/substrate/validator/src/validator.rs b/substrate/validator/src/validator.rs index c251e379183bd417fe09dfab50de73f06f231a59..354bbf73dcedb225123dd8ee90dd2dff3c5e7e97 100644 --- a/substrate/validator/src/validator.rs +++ b/substrate/validator/src/validator.rs @@ -16,7 +16,7 @@ use std::fmt; -use primitives::{validator, parachain}; +use polkadot_primitives::{validator, parachain}; use serde::de::DeserializeOwned; use serializer; @@ -99,4 +99,3 @@ impl<M, B, T, R> Code for T where Ok(self.check(messages, downloads, block_data, head_data)?.into()) } } -