Remove SOURCE_PARACHAIN_PARA_ID (#1716)

* Remove SOURCE_PARACHAIN_PARA_ID

Remove SubstrateParachainsPipeline::SOURCE_PARACHAIN_PARA_ID

* Avoid duplicate ChainBase and ParachainBase implementations

* Replace ChainShadow with UnderlyingChainProvider
This commit is contained in:
Serban Iorga
2022-12-14 12:29:09 +02:00
committed by Bastian Köcher
parent 7d55a0ffe2
commit bde1629f86
27 changed files with 154 additions and 272 deletions
+5 -20
View File
@@ -16,8 +16,9 @@
//! Types used to connect to the Wococo-Substrate chain.
use frame_support::weights::Weight;
use relay_substrate_client::{Chain, ChainBase, ChainWithBalances, ChainWithGrandpa, RelayChain};
use relay_substrate_client::{
Chain, ChainWithBalances, ChainWithGrandpa, RelayChain, UnderlyingChainProvider,
};
use sp_core::storage::StorageKey;
use std::time::Duration;
@@ -31,24 +32,8 @@ pub type SyncHeader = relay_substrate_client::SyncHeader<bp_wococo::Header>;
#[derive(Debug, Clone, Copy)]
pub struct Wococo;
impl ChainBase for Wococo {
type BlockNumber = bp_wococo::BlockNumber;
type Hash = bp_wococo::Hash;
type Hasher = bp_wococo::Hashing;
type Header = bp_wococo::Header;
type AccountId = bp_wococo::AccountId;
type Balance = bp_wococo::Balance;
type Index = bp_wococo::Nonce;
type Signature = bp_wococo::Signature;
fn max_extrinsic_size() -> u32 {
bp_wococo::Wococo::max_extrinsic_size()
}
fn max_extrinsic_weight() -> Weight {
bp_wococo::Wococo::max_extrinsic_weight()
}
impl UnderlyingChainProvider for Wococo {
type Chain = bp_wococo::Wococo;
}
impl Chain for Wococo {