Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
claravanstaden authored and claravanstaden committed Nov 24, 2023
1 parent a9ffcee commit 0857e77
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ use sp_std::prelude::*;
use sp_version::NativeVersion;
use sp_version::RuntimeVersion;

use bridge_hub_common::{
message_queue::{NarrowOriginToSibling, ParaIdToSibling},
AggregateMessageOrigin,
};
use cumulus_primitives_core::ParaId;
use frame_support::{
construct_runtime,
Expand All @@ -58,10 +62,6 @@ use frame_system::{
EnsureRoot,
};
use pallet_xcm::{EnsureXcm, IsVoiceOfBody};
use bridge_hub_common::{
message_queue::{NarrowOriginToSibling, ParaIdToSibling},
AggregateMessageOrigin,
};
pub use sp_consensus_aura::sr25519::AuthorityId as AuraId;
pub use sp_runtime::{MultiAddress, Perbill, Permill};
use xcm_config::{FellowshipLocation, GovernanceLocation, XcmOriginToTransactDispatchOrigin};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ use sp_std::prelude::*;
use sp_version::NativeVersion;
use sp_version::RuntimeVersion;

use bridge_hub_common::{
message_queue::{NarrowOriginToSibling, ParaIdToSibling},
AggregateMessageOrigin,
};
use cumulus_primitives_core::ParaId;
use frame_support::{
construct_runtime,
Expand All @@ -58,10 +62,6 @@ use frame_system::{
EnsureRoot,
};
use pallet_xcm::{EnsureXcm, IsVoiceOfBody};
use bridge_hub_common::{
message_queue::{NarrowOriginToSibling, ParaIdToSibling},
AggregateMessageOrigin,
};
pub use sp_consensus_aura::sr25519::AuthorityId as AuraId;
pub use sp_runtime::{MultiAddress, Perbill, Permill};
use xcm_config::{FellowshipLocation, GovernanceLocation, XcmOriginToTransactDispatchOrigin};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ use frame_system::{
EnsureRoot,
};

use pallet_xcm::EnsureXcm;
use bridge_hub_common::{
message_queue::{NarrowOriginToSibling, ParaIdToSibling},
AggregateMessageOrigin,
};
use pallet_xcm::EnsureXcm;
pub use sp_consensus_aura::sr25519::AuthorityId as AuraId;
pub use sp_runtime::{MultiAddress, Perbill, Permill};
use xcm::VersionedMultiLocation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ use sp_std::prelude::*;
use sp_version::NativeVersion;
use sp_version::RuntimeVersion;

use bridge_hub_common::{
message_queue::{NarrowOriginToSibling, ParaIdToSibling},
AggregateMessageOrigin,
};
use frame_support::{
construct_runtime,
dispatch::DispatchClass,
Expand All @@ -61,10 +65,6 @@ use frame_system::{
limits::{BlockLength, BlockWeights},
EnsureRoot,
};
use bridge_hub_common::{
message_queue::{NarrowOriginToSibling, ParaIdToSibling},
AggregateMessageOrigin,
};
pub use sp_consensus_aura::sr25519::AuthorityId as AuraId;
pub use sp_runtime::{MultiAddress, Perbill, Permill};
use xcm_config::{XcmOriginToTransactDispatchOrigin, XcmRouter};
Expand Down
20 changes: 10 additions & 10 deletions cumulus/parachains/runtimes/bridge-hubs/common/src/message_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ use frame_support::{
};
use pallet_message_queue::OnQueueChanged;
use scale_info::TypeInfo;
use snowbridge_core::ChannelId;
use sp_std::{marker::PhantomData, prelude::*};
use xcm::v3::{Junction, MultiLocation};
use snowbridge_core::ChannelId;

/// The aggregate origin of an inbound message.
/// This is specialized for BridgeHub, as the snowbridge-outbound-queue pallet is also using
Expand Down Expand Up @@ -72,15 +72,15 @@ impl From<u32> for AggregateMessageOrigin {
pub struct BridgeHubMessageRouter<XcmpProcessor, SnowbridgeProcessor>(
PhantomData<(XcmpProcessor, SnowbridgeProcessor)>,
)
where
XcmpProcessor: ProcessMessage<Origin = AggregateMessageOrigin>,
SnowbridgeProcessor: ProcessMessage<Origin = AggregateMessageOrigin>;
where
XcmpProcessor: ProcessMessage<Origin = AggregateMessageOrigin>,
SnowbridgeProcessor: ProcessMessage<Origin = AggregateMessageOrigin>;

impl<XcmpProcessor, SnowbridgeProcessor> ProcessMessage
for BridgeHubMessageRouter<XcmpProcessor, SnowbridgeProcessor>
where
XcmpProcessor: ProcessMessage<Origin = AggregateMessageOrigin>,
SnowbridgeProcessor: ProcessMessage<Origin = AggregateMessageOrigin>,
for BridgeHubMessageRouter<XcmpProcessor, SnowbridgeProcessor>
where
XcmpProcessor: ProcessMessage<Origin = AggregateMessageOrigin>,
SnowbridgeProcessor: ProcessMessage<Origin = AggregateMessageOrigin>,
{
type Origin = AggregateMessageOrigin;

Expand All @@ -101,7 +101,7 @@ for BridgeHubMessageRouter<XcmpProcessor, SnowbridgeProcessor>

pub struct NarrowOriginToSibling<Inner>(PhantomData<Inner>);
impl<Inner: QueuePausedQuery<ParaId>> QueuePausedQuery<AggregateMessageOrigin>
for NarrowOriginToSibling<Inner>
for NarrowOriginToSibling<Inner>
{
fn is_paused(origin: &AggregateMessageOrigin) -> bool {
match origin {
Expand All @@ -112,7 +112,7 @@ for NarrowOriginToSibling<Inner>
}

impl<Inner: OnQueueChanged<ParaId>> OnQueueChanged<AggregateMessageOrigin>
for NarrowOriginToSibling<Inner>
for NarrowOriginToSibling<Inner>
{
fn on_queue_changed(origin: AggregateMessageOrigin, fp: QueueFootprint) {
if let AggregateMessageOrigin::Sibling(id) = origin {
Expand Down
1 change: 0 additions & 1 deletion cumulus/parachains/runtimes/testing/penpal/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,6 @@ impl pallet_assets::Config<pallet_assets::Instance1> for Runtime {
type BenchmarkHelper = ();
}


parameter_types! {
// we just reuse the same deposits
pub const ForeignAssetsAssetDeposit: Balance = AssetDeposit::get();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ impl<Block: BlockT, BE: Backend<Block>> SubscriptionsInner<Block, BE> {
// blocks.
for hash in hashes.clone() {
if !sub.contains_block(hash) {
return Err(SubscriptionManagementError::BlockHashAbsent);
return Err(SubscriptionManagementError::BlockHashAbsent)
}
}

Expand Down

0 comments on commit 0857e77

Please sign in to comment.