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
+1 -8
View File
@@ -27,6 +27,7 @@ use bp_messages::{
InboundLaneData, LaneId, Message, MessageKey, MessageNonce, MessagePayload, OutboundLaneData,
};
use bp_runtime::{messages::MessageDispatchResult, Chain, ChainId, Size, StorageProofChecker};
pub use bp_runtime::{UnderlyingChainOf, UnderlyingChainProvider};
use codec::{Decode, DecodeLimit, Encode};
use frame_support::{traits::Get, weights::Weight, RuntimeDebug};
use hash_db::Hasher;
@@ -54,12 +55,6 @@ pub trait MessageBridge {
type BridgedHeaderChain: HeaderChain<UnderlyingChainOf<Self::BridgedChain>>;
}
/// A trait that provides the type of the underlying chain.
pub trait UnderlyingChainProvider {
/// Underlying chain type.
type Chain: Chain;
}
/// This chain that has `pallet-bridge-messages` module.
pub trait ThisChainWithMessages: UnderlyingChainProvider {
/// Call origin on the chain.
@@ -87,8 +82,6 @@ pub trait BridgedChainWithMessages: UnderlyingChainProvider {
pub type ThisChain<B> = <B as MessageBridge>::ThisChain;
/// Bridged chain in context of message bridge.
pub type BridgedChain<B> = <B as MessageBridge>::BridgedChain;
/// Underlying chain type.
pub type UnderlyingChainOf<C> = <C as UnderlyingChainProvider>::Chain;
/// Hash used on the chain.
pub type HashOf<C> = bp_runtime::HashOf<<C as UnderlyingChainProvider>::Chain>;
/// Hasher used on the chain.