Skip to main content

strip_loopback_endpoints

Function strip_loopback_endpoints 

Source
fn strip_loopback_endpoints(
    path: Vec<OffchainPublicKey>,
    me: &OffchainPublicKey,
) -> Vec<OffchainPublicKey>
Expand description

Strip leading and/or trailing me markers from a loopback path.

simple_loopback_to_self returns [intermediates..., me] — the leading source is already excluded by the graph crate. This helper also strips a leading me defensively in case the graph-crate contract changes, so the result is always a plain intermediate list suitable for IntermediatePath.