mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 10:31:03 +00:00
Support both polkadot and kusama runtimes (#704)
* Allow both polkadot and kusama runtimes * Allow both polkadot and kusama runtimes * Make `collator` build * Removed kusama runtime * Introduced common runtime * Updated for latest substrate * Updated CI targets * Updated CI version check * Removed unused dependency * Pulled latests substrate * Pulled latest substrate * Fixed version * Apply suggestions from code review Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com> * NEW_HEADS_IDENTIFIER moved to primitives * Updated CI check script * Fixed script * Set epoch duration for polkadot * ci: check_runtime for both runtimes Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> Co-authored-by: gabriel klawitter <gabreal@users.noreply.github.com>
This commit is contained in:
committed by
Gavin Wood
parent
9a9bbd1c2d
commit
a00d74d825
@@ -29,7 +29,9 @@ use primitives::{
|
||||
HeadData, BlockData, Id as ParaId, Message, OutgoingMessages, Status as ParachainStatus,
|
||||
},
|
||||
};
|
||||
use collator::{InvalidHead, ParachainContext, VersionInfo, Network, BuildParachainContext};
|
||||
use collator::{
|
||||
InvalidHead, ParachainContext, Network, BuildParachainContext, load_spec, Configuration,
|
||||
};
|
||||
use parking_lot::Mutex;
|
||||
use futures::{future::{Ready, ok, err}, task::Spawn};
|
||||
|
||||
@@ -106,9 +108,9 @@ impl ParachainContext for AdderContext {
|
||||
impl BuildParachainContext for AdderContext {
|
||||
type ParachainContext = Self;
|
||||
|
||||
fn build<B, E, SP>(
|
||||
fn build<B, E, R, SP>(
|
||||
self,
|
||||
_: Arc<collator::PolkadotClient<B, E>>,
|
||||
_: Arc<collator::PolkadotClient<B, E, R>>,
|
||||
_: SP,
|
||||
network: Arc<dyn Network>,
|
||||
) -> Result<Self::ParachainContext, ()>
|
||||
@@ -153,20 +155,12 @@ fn main() {
|
||||
_network: None,
|
||||
};
|
||||
|
||||
let res = ::collator::run_collator(
|
||||
let res = collator::run_collator(
|
||||
context,
|
||||
id,
|
||||
exit,
|
||||
key,
|
||||
VersionInfo {
|
||||
name: "<unknown>",
|
||||
version: "<unknown>",
|
||||
commit: "<unknown>",
|
||||
executable_name: "adder-collator",
|
||||
description: "collator for adder parachain",
|
||||
author: "parity technologies",
|
||||
support_url: "https://github.com/paritytech/polkadot/issues/new",
|
||||
}
|
||||
Configuration::default_with_spec_and_base_path(load_spec("dev").unwrap().unwrap(), None),
|
||||
);
|
||||
|
||||
if let Err(e) = res {
|
||||
|
||||
Reference in New Issue
Block a user