Skip to content

implement InspectMessageQueues for UnpaidRemoteExporter #9250

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions polkadot/xcm/xcm-builder/src/universal_exports.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,18 @@ impl<Bridges: ExporterFor, Router: SendXcm, UniversalLocation: Get<InteriorLocat
}
}

impl<Bridges, Router, UniversalLocation> InspectMessageQueues
for UnpaidRemoteExporter<Bridges, Router, UniversalLocation>
{
fn clear_messages() {}

/// This router needs to implement `InspectMessageQueues` but doesn't have to
/// return any messages, since it just reuses the `XcmpQueue` router.
Comment on lines +339 to +340
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, not related to this PR, but I still can't wrap my head around this. I had issues understanding this in the past as well: https://github.com/paritytech/polkadot-sdk/pull/5913/files#r1793479596

Is this behavior a property of the implementation of UnpaidRemoteExporter or a property of the fact that the final Router is XcmpQueue ? And can we rely on the fact that the final Router is always XcmpQueue ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually approving this PR since my concern is unrelated, and I'll think some more about this issue later. I'll open a separate PR if I find a different approach.

fn get_messages() -> Vec<(VersionedLocation, Vec<VersionedXcm<()>>)> {
Vec::new()
}
}

/// Implementation of `SendXcm` which wraps the message inside an `ExportMessage` instruction
/// and sends it to a destination known to be able to handle it.
///
Expand Down
Loading