Version bump, fixes (#572)

* Bump version, don't propose invalid blocks

* Fix build.

* Fixes.

* More fixes.

* Fix tests.

* Fix more tests

* More tests fixed
This commit is contained in:
Gav Wood
2018-08-15 21:50:39 +02:00
committed by GitHub
parent 314e2eeaf9
commit f12221c4e6
4 changed files with 10 additions and 5 deletions
+3 -2
View File
@@ -22,9 +22,10 @@ use runtime_primitives::traits::{Checkable, AuxLookup};
use timestamp::Call as TimestampCall;
use parachains::Call as ParachainsCall;
use staking::Call as StakingCall;
use version::RuntimeVersion;
/// Produces the list of inherent extrinsics.
pub fn inherent_extrinsics(data: ::primitives::InherentData) -> Vec<UncheckedExtrinsic> {
pub fn inherent_extrinsics(data: ::primitives::InherentData, runtime_version: RuntimeVersion) -> Vec<UncheckedExtrinsic> {
let make_inherent = |function| UncheckedExtrinsic::new(
Extrinsic {
signed: Default::default(),
@@ -39,7 +40,7 @@ pub fn inherent_extrinsics(data: ::primitives::InherentData) -> Vec<UncheckedExt
make_inherent(Call::Parachains(ParachainsCall::set_heads(data.parachain_heads))),
];
if !data.offline_indices.is_empty() {
if !data.offline_indices.is_empty() && runtime_version.spec_version == 4 {
inherent.push(make_inherent(
Call::Staking(StakingCall::note_missed_proposal(data.offline_indices))
));