Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
bkontur committed Jan 13, 2025
1 parent 5893620 commit 80f542d
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions polkadot/xcm/xcm-builder/src/universal_exports.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ pub struct UnpaidLocalExporter<Exporter, UniversalLocation>(
PhantomData<(Exporter, UniversalLocation)>,
);
impl<Exporter: ExportXcm, UniversalLocation: Get<InteriorLocation>> SendXcm
for UnpaidLocalExporter<Exporter, UniversalLocation>
for UnpaidLocalExporter<Exporter, UniversalLocation>
{
type Ticket = Exporter::Ticket;

Expand All @@ -88,12 +88,12 @@ for UnpaidLocalExporter<Exporter, UniversalLocation>
remote_location,
xcm.clone(),
)
.inspect_err(|err| {
if let NotApplicable = err {
// We need to make sure that msg is not consumed in case of `NotApplicable`.
*msg = Some(xcm);
}
})
.inspect_err(|err| {
if let NotApplicable = err {
// We need to make sure that msg is not consumed in case of `NotApplicable`.
*msg = Some(xcm);
}
})
}

fn deliver(ticket: Exporter::Ticket) -> Result<XcmHash, SendError> {
Expand All @@ -108,9 +108,7 @@ for UnpaidLocalExporter<Exporter, UniversalLocation>
/// the message over a bridge.
///
/// This is only useful when the local chain has bridging capabilities.
pub struct LocalExporter<Exporter, UniversalLocation>(
PhantomData<(Exporter, UniversalLocation)>,
);
pub struct LocalExporter<Exporter, UniversalLocation>(PhantomData<(Exporter, UniversalLocation)>);
impl<Exporter: ExportXcm, UniversalLocation: Get<InteriorLocation>> SendXcm
for LocalExporter<Exporter, UniversalLocation>
{
Expand All @@ -127,7 +125,8 @@ impl<Exporter: ExportXcm, UniversalLocation: Get<InteriorLocation>> SendXcm
let (remote_network, remote_location) = devolved;
let xcm = msg.take().ok_or(MissingArgument)?;

let hash = (Some(Location::here()), &remote_location).using_encoded(sp_io::hashing::blake2_128);
let hash =
(Some(Location::here()), &remote_location).using_encoded(sp_io::hashing::blake2_128);
let channel = u32::decode(&mut hash.as_ref()).unwrap_or(0);

validate_export::<Exporter>(
Expand Down

0 comments on commit 80f542d

Please sign in to comment.