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 the leading source and trailing destination from a loopback path.

simple_loopback_to_self returns [me, intermediates..., me]. The caller adds me as the destination and the planner prepends me as source, so only the interior intermediate nodes are needed.