Commit 4cded439 authored by Gav's avatar Gav
Browse files

Fix build

parent ff447ce3
......@@ -448,7 +448,7 @@ dependencies = [
[[package]]
name = "ed25519"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f074c15cae617ed1734efda5308e4753d79d9006"
dependencies = [
"base58 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -488,7 +488,7 @@ dependencies = [
[[package]]
name = "environmental"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f074c15cae617ed1734efda5308e4753d79d9006"
[[package]]
name = "error-chain"
......@@ -1979,7 +1979,7 @@ dependencies = [
[[package]]
name = "pwasm-alloc"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f074c15cae617ed1734efda5308e4753d79d9006"
dependencies = [
"pwasm-libc 0.1.0 (git+https://github.com/paritytech/substrate?branch=polkadot)",
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -1988,7 +1988,7 @@ dependencies = [
[[package]]
name = "pwasm-libc"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f074c15cae617ed1734efda5308e4753d79d9006"
[[package]]
name = "quick-error"
......@@ -2488,7 +2488,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "substrate-bft"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f074c15cae617ed1734efda5308e4753d79d9006"
dependencies = [
"ed25519 0.1.0 (git+https://github.com/paritytech/substrate?branch=polkadot)",
"error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -2507,7 +2507,7 @@ dependencies = [
[[package]]
name = "substrate-cli"
version = "0.3.0"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f074c15cae617ed1734efda5308e4753d79d9006"
dependencies = [
"ansi_term 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)",
"app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -2538,7 +2538,7 @@ dependencies = [
[[package]]
name = "substrate-client"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f074c15cae617ed1734efda5308e4753d79d9006"
dependencies = [
"ed25519 0.1.0 (git+https://github.com/paritytech/substrate?branch=polkadot)",
"error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -2568,7 +2568,7 @@ dependencies = [
[[package]]
name = "substrate-client-db"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f074c15cae617ed1734efda5308e4753d79d9006"
dependencies = [
"hashdb 0.2.1 (git+https://github.com/paritytech/parity-common.git)",
"kvdb 0.1.0 (git+https://github.com/paritytech/parity-common.git)",
......@@ -2590,7 +2590,7 @@ dependencies = [
[[package]]
name = "substrate-codec"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f074c15cae617ed1734efda5308e4753d79d9006"
dependencies = [
"arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)",
]
......@@ -2598,7 +2598,7 @@ dependencies = [
[[package]]
name = "substrate-codec-derive"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f074c15cae617ed1734efda5308e4753d79d9006"
dependencies = [
"proc-macro2 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -2608,7 +2608,7 @@ dependencies = [
[[package]]
name = "substrate-executor"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f074c15cae617ed1734efda5308e4753d79d9006"
dependencies = [
"byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"ed25519 0.1.0 (git+https://github.com/paritytech/substrate?branch=polkadot)",
......@@ -2634,7 +2634,7 @@ dependencies = [
[[package]]
name = "substrate-extrinsic-pool"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f074c15cae617ed1734efda5308e4753d79d9006"
dependencies = [
"error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
"futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -2649,7 +2649,7 @@ dependencies = [
[[package]]
name = "substrate-keyring"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f074c15cae617ed1734efda5308e4753d79d9006"
dependencies = [
"ed25519 0.1.0 (git+https://github.com/paritytech/substrate?branch=polkadot)",
"hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -2659,7 +2659,7 @@ dependencies = [
[[package]]
name = "substrate-keystore"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f074c15cae617ed1734efda5308e4753d79d9006"
dependencies = [
"ed25519 0.1.0 (git+https://github.com/paritytech/substrate?branch=polkadot)",
"error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -2675,7 +2675,7 @@ dependencies = [
[[package]]
name = "substrate-network"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f074c15cae617ed1734efda5308e4753d79d9006"
dependencies = [
"bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"ed25519 0.1.0 (git+https://github.com/paritytech/substrate?branch=polkadot)",
......@@ -2697,7 +2697,7 @@ dependencies = [
[[package]]
name = "substrate-network-libp2p"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f074c15cae617ed1734efda5308e4753d79d9006"
dependencies = [
"bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
"error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -2720,7 +2720,7 @@ dependencies = [
[[package]]
name = "substrate-primitives"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f074c15cae617ed1734efda5308e4753d79d9006"
dependencies = [
"blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -2746,7 +2746,7 @@ dependencies = [
[[package]]
name = "substrate-rpc"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f074c15cae617ed1734efda5308e4753d79d9006"
dependencies = [
"error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
"jsonrpc-core 8.0.2 (git+https://github.com/paritytech/jsonrpc.git)",
......@@ -2768,7 +2768,7 @@ dependencies = [
[[package]]
name = "substrate-rpc-servers"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f074c15cae617ed1734efda5308e4753d79d9006"
dependencies = [
"jsonrpc-core 8.0.2 (git+https://github.com/paritytech/jsonrpc.git)",
"jsonrpc-http-server 8.0.1 (git+https://github.com/paritytech/jsonrpc.git)",
......@@ -2783,7 +2783,7 @@ dependencies = [
[[package]]
name = "substrate-runtime-balances"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f074c15cae617ed1734efda5308e4753d79d9006"
dependencies = [
"hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -2807,7 +2807,7 @@ dependencies = [
[[package]]
name = "substrate-runtime-consensus"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f074c15cae617ed1734efda5308e4753d79d9006"
dependencies = [
"hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.71 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -2824,7 +2824,7 @@ dependencies = [
[[package]]
name = "substrate-runtime-council"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f074c15cae617ed1734efda5308e4753d79d9006"
dependencies = [
"hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"integer-sqrt 0.1.0 (git+https://github.com/paritytech/integer-sqrt-rs.git)",
......@@ -2847,7 +2847,7 @@ dependencies = [
[[package]]
name = "substrate-runtime-democracy"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f074c15cae617ed1734efda5308e4753d79d9006"
dependencies = [
"hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -2868,7 +2868,7 @@ dependencies = [
[[package]]
name = "substrate-runtime-executive"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f074c15cae617ed1734efda5308e4753d79d9006"
dependencies = [
"hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.71 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -2885,7 +2885,7 @@ dependencies = [
[[package]]
name = "substrate-runtime-io"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f074c15cae617ed1734efda5308e4753d79d9006"
dependencies = [
"ed25519 0.1.0 (git+https://github.com/paritytech/substrate?branch=polkadot)",
"environmental 0.1.0 (git+https://github.com/paritytech/substrate?branch=polkadot)",
......@@ -2900,7 +2900,7 @@ dependencies = [
[[package]]
name = "substrate-runtime-primitives"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f074c15cae617ed1734efda5308e4753d79d9006"
dependencies = [
"integer-sqrt 0.1.0 (git+https://github.com/paritytech/integer-sqrt-rs.git)",
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -2918,7 +2918,7 @@ dependencies = [
[[package]]
name = "substrate-runtime-sandbox"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f074c15cae617ed1734efda5308e4753d79d9006"
dependencies = [
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"substrate-codec 0.1.0 (git+https://github.com/paritytech/substrate?branch=polkadot)",
......@@ -2931,7 +2931,7 @@ dependencies = [
[[package]]
name = "substrate-runtime-session"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f074c15cae617ed1734efda5308e4753d79d9006"
dependencies = [
"hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -2953,7 +2953,7 @@ dependencies = [
[[package]]
name = "substrate-runtime-staking"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f074c15cae617ed1734efda5308e4753d79d9006"
dependencies = [
"hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -2978,7 +2978,7 @@ dependencies = [
[[package]]
name = "substrate-runtime-std"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f074c15cae617ed1734efda5308e4753d79d9006"
dependencies = [
"pwasm-alloc 0.1.0 (git+https://github.com/paritytech/substrate?branch=polkadot)",
"pwasm-libc 0.1.0 (git+https://github.com/paritytech/substrate?branch=polkadot)",
......@@ -2988,7 +2988,7 @@ dependencies = [
[[package]]
name = "substrate-runtime-support"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f074c15cae617ed1734efda5308e4753d79d9006"
dependencies = [
"ed25519 0.1.0 (git+https://github.com/paritytech/substrate?branch=polkadot)",
"hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -3003,7 +3003,7 @@ dependencies = [
[[package]]
name = "substrate-runtime-system"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f074c15cae617ed1734efda5308e4753d79d9006"
dependencies = [
"hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -3021,7 +3021,7 @@ dependencies = [
[[package]]
name = "substrate-runtime-timestamp"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f074c15cae617ed1734efda5308e4753d79d9006"
dependencies = [
"hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.71 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -3039,7 +3039,7 @@ dependencies = [
[[package]]
name = "substrate-runtime-version"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f074c15cae617ed1734efda5308e4753d79d9006"
dependencies = [
"serde 1.0.71 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.71 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -3052,7 +3052,7 @@ dependencies = [
[[package]]
name = "substrate-serializer"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f074c15cae617ed1734efda5308e4753d79d9006"
dependencies = [
"serde 1.0.71 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -3061,7 +3061,7 @@ dependencies = [
[[package]]
name = "substrate-service"
version = "0.3.0"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f074c15cae617ed1734efda5308e4753d79d9006"
dependencies = [
"error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
"exit-future 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -3093,7 +3093,7 @@ dependencies = [
[[package]]
name = "substrate-state-db"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f074c15cae617ed1734efda5308e4753d79d9006"
dependencies = [
"log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -3105,7 +3105,7 @@ dependencies = [
[[package]]
name = "substrate-state-machine"
version = "0.1.0"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f074c15cae617ed1734efda5308e4753d79d9006"
dependencies = [
"byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"hashdb 0.2.1 (git+https://github.com/paritytech/parity-common.git)",
......@@ -3123,7 +3123,7 @@ dependencies = [
[[package]]
name = "substrate-telemetry"
version = "0.3.0"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea"
source = "git+https://github.com/paritytech/substrate?branch=polkadot#f074c15cae617ed1734efda5308e4753d79d9006"
dependencies = [
"lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
......
......@@ -166,7 +166,7 @@ impl<B: LocalBackend<Block, KeccakHasher, RlpCodec>> PolkadotApi for Client<B, L
let runtime_version = self.runtime_version_at(at)?;
with_runtime!(self, at, || {
let extrinsics = ::runtime::inherent_extrinsics(inherent_data, runtime_version);
let extrinsics = ::runtime::inherent_extrinsics(inherent_data, runtime_version.spec_version);
extrinsics.into_iter()
.map(|x| x.encode()) // get encoded representation
.map(|x| Decode::decode(&mut &x[..])) // get byte-vec equivalent to extrinsic
......@@ -209,10 +209,10 @@ mod tests {
authorities: session_keys(),
}),
system: None,
balances: Some(Default::default()),
session: Some(SessionConfig {
validators: validators(),
session_length: 100,
broken_percent_late: 100,
}),
council: Some(Default::default()),
democracy: Some(Default::default()),
......
......@@ -255,7 +255,7 @@ impl_outer_config! {
pub struct GenesisConfig for Concrete {
ConsensusConfig => consensus,
SystemConfig => system,
BaalncesConfig => balances,
BalancesConfig => balances,
SessionConfig => session,
StakingConfig => staking,
DemocracyConfig => democracy,
......@@ -273,7 +273,7 @@ pub mod api {
apply_extrinsic => |extrinsic| super::Executive::apply_extrinsic(extrinsic),
execute_block => |block| super::Executive::execute_block(block),
finalise_block => |()| super::Executive::finalise_block(),
inherent_extrinsics => |(inherent, version)| super::inherent_extrinsics(inherent, version),
inherent_extrinsics => |(inherent, spec_version)| super::inherent_extrinsics(inherent, spec_version),
validator_count => |()| super::Session::validator_count(),
validators => |()| super::Session::validators()
);
......
......@@ -258,7 +258,9 @@ mod tests {
type PublicAux = u64;
}
impl consensus::Trait for Test {
const NOTE_OFFLINE_POSITION: u32 = 1;
type SessionKey = u64;
type OnOfflineValidator = ();
}
impl system::Trait for Test {
type PublicAux = <Self as HasPublicAux>::PublicAux;
......@@ -269,11 +271,12 @@ mod tests {
type Digest = Digest;
type AccountId = u64;
type Header = Header;
type Event = ();
}
impl session::Trait for Test {
const NOTE_OFFLINE_POSITION: u32 = 1;
type ConvertAccountIdToSessionKey = Identity;
type OnSessionChange = ();
type Event = ();
}
impl timestamp::Trait for Test {
const TIMESTAMP_SET_POSITION: u32 = 0;
......@@ -296,7 +299,6 @@ mod tests {
t.extend(session::GenesisConfig::<Test>{
session_length: 1000,
validators: vec![1, 2, 3, 4, 5, 6, 7, 8],
broken_percent_late: 100,
}.build_storage().unwrap());
t.extend(GenesisConfig::<Test>{
parachains: parachains,
......
......@@ -22,10 +22,9 @@ use runtime_primitives::traits::{Checkable, AuxLookup};
use timestamp::Call as TimestampCall;
use parachains::Call as ParachainsCall;
use consensus::Call as ConsensusCall;
use version::RuntimeVersion;
/// Produces the list of inherent extrinsics.
pub fn inherent_extrinsics(data: ::primitives::InherentData, runtime_version: RuntimeVersion) -> Vec<UncheckedExtrinsic> {
pub fn inherent_extrinsics(data: ::primitives::InherentData, spec_version: u32) -> Vec<UncheckedExtrinsic> {
let make_inherent = |function| UncheckedExtrinsic::new(
Extrinsic {
signed: Default::default(),
......@@ -40,7 +39,7 @@ pub fn inherent_extrinsics(data: ::primitives::InherentData, runtime_version: Ru
make_inherent(Call::Parachains(ParachainsCall::set_heads(data.parachain_heads))),
];
if !data.offline_indices.is_empty() && runtime_version.spec_version == 4 {
if !data.offline_indices.is_empty() && spec_version == 4 {
inherent.push(make_inherent(
Call::Consensus(ConsensusCall::note_offline(data.offline_indices))
));
......
This diff is collapsed.
......@@ -11,10 +11,12 @@ integer-sqrt = { git = "https://github.com/paritytech/integer-sqrt-rs.git", bran
polkadot-primitives = { path = "../../primitives", default-features = false }
safe-mix = { version = "1.0", default-features = false }
substrate-codec = { git = "https://github.com/paritytech/substrate", branch = "polkadot", default-features = false }
substrate-codec-derive = { git = "https://github.com/paritytech/substrate", branch = "polkadot", default-features = false }
substrate-primitives = { git = "https://github.com/paritytech/substrate", branch = "polkadot", default-features = false }
substrate-runtime-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot", default-features = false }
substrate-runtime-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot", default-features = false }
substrate-runtime-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot", default-features = false }
substrate-runtime-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot", default-features = false }
substrate-runtime-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot", default-features = false }
substrate-runtime-council = { git = "https://github.com/paritytech/substrate", branch = "polkadot", default-features = false }
substrate-runtime-democracy = { git = "https://github.com/paritytech/substrate", branch = "polkadot", default-features = false }
......@@ -32,10 +34,12 @@ std = [
"polkadot-primitives/std",
"safe-mix/std",
"substrate-codec/std",
"substrate-codec-derive/std",
"substrate-primitives/std",
"substrate-runtime-std/std",
"substrate-runtime-io/std",
"substrate-runtime-support/std",
"substrate-runtime-balances/std",
"substrate-runtime-consensus/std",
"substrate-runtime-council/std",
"substrate-runtime-democracy/std",
......
......@@ -19,7 +19,7 @@
use ed25519;
use primitives::AuthorityId;
use polkadot_runtime::{GenesisConfig, ConsensusConfig, CouncilConfig, DemocracyConfig,
SessionConfig, StakingConfig, TimestampConfig};
SessionConfig, StakingConfig, TimestampConfig, BalancesConfig};
use service::ChainSpec;
const STAGING_TELEMETRY_URL: &str = "wss://telemetry.polkadot.io/submit/";
......@@ -44,26 +44,29 @@ fn staging_testnet_config_genesis() -> GenesisConfig {
authorities: initial_authorities.clone(),
}),
system: None,
balances: Some(BalancesConfig {
transaction_base_fee: 100,
transaction_byte_fee: 1,
existential_deposit: 500,
transfer_fee: 0,
creation_fee: 0,
reclaim_rebate: 0,
balances: endowed_accounts.iter().map(|&k|(k, 1u128 << 60)).collect(),
}),
session: Some(SessionConfig {
validators: initial_authorities.iter().cloned().map(Into::into).collect(),
session_length: 60, // that's 5 minutes per session.
broken_percent_late: 50,
}),
staking: Some(StakingConfig {
current_era: 0,
intentions: initial_authorities.iter().cloned().map(Into::into).collect(),
transaction_base_fee: 100,
transaction_byte_fee: 1,
existential_deposit: 500,
transfer_fee: 0,
creation_fee: 0,
reclaim_rebate: 0,
early_era_slash: 10000,
session_reward: 100,
balances: endowed_accounts.iter().map(|&k|(k, 1u128 << 60)).collect(),
validator_count: 12,
sessions_per_era: 12, // 1 hour per era
bonding_duration: 24 * 60 * 12, // 1 day per bond.
offline_slash_grace: 4,
minimum_validator_count: 4,
}),
democracy: Some(DemocracyConfig {
launch_period: 12 * 60 * 24, // 1 day per public referendum
......@@ -119,14 +122,7 @@ fn testnet_genesis(initial_authorities: Vec<AuthorityId>) -> GenesisConfig {
authorities: initial_authorities.clone(),
}),
system: None,
session: Some(SessionConfig {
validators: initial_authorities.iter().cloned().map(Into::into).collect(),
session_length: 10,
broken_percent_late: 30,
}),
staking: Some(StakingConfig {
current_era: 0,
intentions: initial_authorities.iter().cloned().map(Into::into).collect(),
balances: Some(BalancesConfig {
transaction_base_fee: 1,
transaction_byte_fee: 0,
existential_deposit: 500,
......@@ -134,11 +130,21 @@ fn testnet_genesis(initial_authorities: Vec<AuthorityId>) -> GenesisConfig {
creation_fee: 0,
reclaim_rebate: 0,
balances: endowed_accounts.iter().map(|&k|(k, (1u128 << 60))).collect(),
}),
session: Some(SessionConfig {
validators: initial_authorities.iter().cloned().map(Into::into).collect(),
session_length: 10,
}),
staking: Some(StakingConfig {
current_era: 0,
intentions: initial_authorities.iter().cloned().map(Into::into).collect(),
minimum_validator_count: 1,
validator_count: 2,
sessions_per_era: 5,
bonding_duration: 2 * 60 * 12,
early_era_slash: 0,
session_reward: 0,
offline_slash_grace: 0,
}),
democracy: Some(DemocracyConfig {
launch_period: 9,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment