Fix build

This commit is contained in:
Gav
2018-08-30 13:40:05 +02:00
parent 57e2257a54
commit 1b0861a1e3
11 changed files with 507 additions and 422 deletions
+2 -2
View File
@@ -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()
);
+4 -2
View File
@@ -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,
+2 -3
View File
@@ -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))
));