fedimint_ln_client::api

Function filter_duplicate_gateways

Source
fn filter_duplicate_gateways(
    gateways: &BTreeMap<PeerId, Vec<LightningGatewayAnnouncement>>,
) -> Vec<LightningGatewayAnnouncement>
Expand description

Filter out duplicate gateways. This is necessary because different guardians may have different TTLs for the same gateway, so two LightningGatewayAnnouncements representing the same gateway registration may not be equal.