Remove v0 parachains runtime (#1501)

* remove v0 parachains modules and switch to v1 primitives

* get tests compiling for runtime-common

* remove registrar module

* Add a dummy module

* remove runtime-parachains

* mostly remove old parachains code from polkadot-runtime

* remove slots::Trait implementation

* remove sp_std prelude import

* add a ZeroSizedTypeDifferentiator to dummy

* finish porting over polkadot runtime

* ZeroSizedTypeDifferentiator was actually unnecessary

* westend

* kusama

* test-runtime (no dummy modules)

* fix warning

* fix chain-specs

* fix test-service

* test-client

* remove dead import

* remove unused needed_extrinsics parameter

* runtimes compile

* remove rococo-v0

* remove remaining references to Rococo

* bump versions
This commit is contained in:
Robert Habermeier
2020-08-13 15:55:27 +02:00
committed by GitHub
parent e6688620b5
commit 57aef8eef5
34 changed files with 415 additions and 8140 deletions
@@ -326,20 +326,13 @@ pub fn new_native_executor() -> sc_executor::NativeExecutor<LocalExecutor> {
/// The index of the block must be provided to calculate a valid timestamp for the block. The value starts at 0 and
/// should be incremented by one for every block produced.
pub fn needed_extrinsics(
heads: Vec<polkadot_primitives::v0::AttestedCandidate>,
i: u64,
) -> Vec<polkadot_test_runtime::UncheckedExtrinsic> {
use polkadot_runtime_common::parachains;
let timestamp = std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH)
.expect("now always later than unix epoch; qed")
.as_millis() + (i * polkadot_test_runtime::constants::time::SLOT_DURATION / 2) as u128;
vec![
polkadot_test_runtime::UncheckedExtrinsic {
function: polkadot_test_runtime::Call::Parachains(parachains::Call::set_heads(heads)),
signature: None,
},
polkadot_test_runtime::UncheckedExtrinsic {
function: polkadot_test_runtime::Call::Timestamp(pallet_timestamp::Call::set(
u64::try_from(timestamp).expect("unexpected big timestamp"),