Make node-template in sync with node. (#3422)

* Make node-template in sync with node.

* Update service.rs

* Updated babe constants.

* Added SignedExtra for CheckVersion in node-template and subkey.

* Added CheckVersion SignedExtra for node.

* Fixed tests.

* Try fix integration test.

* Attempt 2 at fixing integration test.

* Update node-template/runtime/src/lib.rs
This commit is contained in:
Gautam Dhameja
2019-08-19 09:17:33 +02:00
committed by Gavin Wood
parent 8eacdb54de
commit 0bb44f5024
15 changed files with 456 additions and 181 deletions
@@ -77,6 +77,7 @@ pub trait RuntimeAdapter {
key: &Self::Secret,
destination: &Self::AccountId,
amount: &Self::Balance,
version: u32,
genesis_hash: &<Self::Block as BlockT>::Hash,
prior_block_hash: &<Self::Block as BlockT>::Hash,
) -> <Self::Block as BlockT>::Extrinsic;
@@ -119,6 +120,7 @@ where
select_chain.best_chain().map_err(|e| format!("{:?}", e).into());
let mut best_hash = best_header?.hash();
let best_block_id = BlockId::<F::Block>::hash(best_hash);
let version = client.runtime_version_at(&best_block_id)?.spec_version;
let genesis_hash = client.block_hash(Zero::zero())?
.expect("Genesis block always exists; qed").into();
@@ -126,6 +128,7 @@ where
Mode::MasterToNToM => complex_mode::next::<F, RA>(
&mut factory_state,
&client,
version,
genesis_hash,
best_hash.into(),
best_block_id,
@@ -133,6 +136,7 @@ where
_ => simple_modes::next::<F, RA>(
&mut factory_state,
&client,
version,
genesis_hash,
best_hash.into(),
best_block_id,