Skip to content

Optimize reanchor #897

Open
Open
@gavofyork

Description

Concerning MultiLocation::reanchor:

So I realized that what we're essentially doing here is to first find the common ancestor between self and target, then append the necessary junctions that will allow us to reach self from the common ancestor, and then we'd simplify the result, given target.

I suspect what we can do here is to write the common ancestor from the perspective of target, that way we don't have to simplify at the end of the algorithm.

Originally posted by @KiChjang in paritytech/polkadot#4470 (comment)

Metadata

Assignees

No one assigned

    Labels

    T6-XCMThis PR/Issue is related to XCM.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions