pub trait Router {
    fn find_route(
        &self,
        payer: &PublicKey,
        route_params: &RouteParameters,
        payment_hash: &PaymentHash,
        first_hops: Option<&[&ChannelDetails]>,
        inflight_htlcs: InFlightHtlcs
    ) -> Result<Route, LightningError>; fn notify_payment_path_failed(
        &self,
        path: &[&RouteHop],
        short_channel_id: u64
    ); fn notify_payment_path_successful(&self, path: &[&RouteHop]); fn notify_payment_probe_successful(&self, path: &[&RouteHop]); fn notify_payment_probe_failed(
        &self,
        path: &[&RouteHop],
        short_channel_id: u64
    ); }
Expand description

A trait defining behavior for routing an Invoice payment.

Required Methods

Finds a Route between payer and payee for a payment with the given values.

Lets the router know that payment through a specific path has failed.

Lets the router know that payment through a specific path was successful.

Lets the router know that a payment probe was successful.

Lets the router know that a payment probe failed.

Implementors