mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 22:11:06 +00:00
cumulus: add asset-hub-rococo runtime based on asset-hub-kusama and add asset-bridging support to it (#1215)
This commit adds Rococo Asset Hub dedicated runtime so we can test new features here, before merging them in Kusama Asset Hub. Also adds one such feature: asset transfer over bridge (Rococo AssetHub <> Wococo AssetHub) - clone `asset-hub-kusama-runtime` -> `asset-hub-rococo-runtime` - make it use Rococo primitives, names, assets, constants, etc - add asset-transfer-over-bridge support to Rococo AssetHub <> Wococo AssetHub Fixes #1128 --------- Co-authored-by: Branislav Kontur <bkontur@gmail.com> Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com>
This commit is contained in:
@@ -35,6 +35,8 @@ mod tests;
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
mod benchmarking;
|
||||
#[cfg(feature = "bridging")]
|
||||
pub mod bridging;
|
||||
pub mod weights;
|
||||
pub use weights::WeightInfo;
|
||||
|
||||
@@ -947,6 +949,24 @@ impl<T: Config> Pallet<T> {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
#[cfg(feature = "bridging")]
|
||||
fn is_inbound_channel_suspended(sender: ParaId) -> bool {
|
||||
<InboundXcmpStatus<T>>::get()
|
||||
.iter()
|
||||
.find(|c| c.sender == sender)
|
||||
.map(|c| c.state == InboundState::Suspended)
|
||||
.unwrap_or(false)
|
||||
}
|
||||
|
||||
#[cfg(feature = "bridging")]
|
||||
/// Returns tuple of `OutboundState` and number of queued pages.
|
||||
fn outbound_channel_state(target: ParaId) -> Option<(OutboundState, u16)> {
|
||||
<OutboundXcmpStatus<T>>::get().iter().find(|c| c.recipient == target).map(|c| {
|
||||
let queued_pages = c.last_index.saturating_sub(c.first_index);
|
||||
(c.state, queued_pages)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Config> XcmpMessageHandler for Pallet<T> {
|
||||
|
||||
Reference in New Issue
Block a user