mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 22:11:02 +00:00
Complex RialtoParachain <> Millau relay (#1405)
* complex parachain relay * fix spelling
This commit is contained in:
committed by
Bastian Köcher
parent
5f2f61ced5
commit
542ebb5654
@@ -64,6 +64,20 @@ pub trait Chain: ChainBase + Clone {
|
||||
type WeightToFee: WeightToFeePolynomial<Balance = Self::Balance>;
|
||||
}
|
||||
|
||||
/// Substrate-based relay chain that supports parachains.
|
||||
///
|
||||
/// We assume that the parachains are supported using `runtime_parachains::paras` pallet.
|
||||
pub trait RelayChain: Chain {
|
||||
/// Name of the `runtime_parachains::paras` pallet in the runtime of this chain.
|
||||
const PARAS_PALLET_NAME: &'static str;
|
||||
/// Name of the bridge parachains pallet (used in `construct_runtime` macro call) that is
|
||||
/// deployed at the **bridged** chain.
|
||||
///
|
||||
/// We assume that all chains that are bridging with this `ChainWithGrandpa` are using
|
||||
/// the same name.
|
||||
const PARACHAINS_FINALITY_PALLET_NAME: &'static str;
|
||||
}
|
||||
|
||||
/// Substrate-based chain that is using direct GRANDPA finality from minimal relay-client point of
|
||||
/// view.
|
||||
///
|
||||
|
||||
@@ -262,6 +262,11 @@ impl<C: Chain> Client<C> {
|
||||
Ok(*self.header_by_hash(self.best_finalized_header_hash().await?).await?.number())
|
||||
}
|
||||
|
||||
/// Return header of the best finalized block.
|
||||
pub async fn best_finalized_header(&self) -> Result<C::Header> {
|
||||
self.header_by_hash(self.best_finalized_header_hash().await?).await
|
||||
}
|
||||
|
||||
/// Returns the best Substrate header.
|
||||
pub async fn best_header(&self) -> Result<C::Header>
|
||||
where
|
||||
|
||||
@@ -33,8 +33,8 @@ use std::time::Duration;
|
||||
pub use crate::{
|
||||
chain::{
|
||||
AccountKeyPairOf, BlockWithJustification, CallOf, Chain, ChainWithBalances,
|
||||
ChainWithGrandpa, ChainWithMessages, SignParam, TransactionSignScheme, TransactionStatusOf,
|
||||
UnsignedTransaction, WeightToFeeOf,
|
||||
ChainWithGrandpa, ChainWithMessages, RelayChain, SignParam, TransactionSignScheme,
|
||||
TransactionStatusOf, UnsignedTransaction, WeightToFeeOf,
|
||||
},
|
||||
client::{ChainRuntimeVersion, Client, OpaqueGrandpaAuthoritiesSet, Subscription},
|
||||
error::{Error, Result},
|
||||
|
||||
Reference in New Issue
Block a user