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 -21
View File
@@ -18,10 +18,10 @@
use bp_messages::MessageNonce;
use codec::{Compact, Decode, Encode};
use frame_support::weights::Weight;
use relay_substrate_client::{
BalanceOf, Chain, ChainBase, ChainWithBalances, ChainWithGrandpa, ChainWithMessages,
ChainWithTransactions, Error as SubstrateError, IndexOf, SignParam, UnsignedTransaction,
BalanceOf, Chain, ChainWithBalances, ChainWithGrandpa, ChainWithMessages,
ChainWithTransactions, Error as SubstrateError, IndexOf, SignParam, UnderlyingChainProvider,
UnsignedTransaction,
};
use sp_core::{storage::StorageKey, Pair};
use sp_runtime::{generic::SignedPayload, traits::IdentifyAccount};
@@ -34,24 +34,8 @@ pub type HeaderId = relay_utils::HeaderId<millau_runtime::Hash, millau_runtime::
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct Millau;
impl ChainBase for Millau {
type BlockNumber = millau_runtime::BlockNumber;
type Hash = millau_runtime::Hash;
type Hasher = millau_runtime::Hashing;
type Header = millau_runtime::Header;
type AccountId = millau_runtime::AccountId;
type Balance = millau_runtime::Balance;
type Index = millau_runtime::Index;
type Signature = millau_runtime::Signature;
fn max_extrinsic_size() -> u32 {
bp_millau::Millau::max_extrinsic_size()
}
fn max_extrinsic_weight() -> Weight {
bp_millau::Millau::max_extrinsic_weight()
}
impl UnderlyingChainProvider for Millau {
type Chain = bp_millau::Millau;
}
impl ChainWithGrandpa for Millau {