Class Router


  • public class Router
    extends Object
    A trait defining behavior for routing a payment.
    • Method Detail

      • find_route_with_id

        public Result_RouteLightningErrorZ find_route_with_id​(byte[] payer,
                                                              RouteParameters route_params,
                                                              @Nullable
                                                              ChannelDetails[] first_hops,
                                                              InFlightHtlcs inflight_htlcs,
                                                              byte[] _payment_hash,
                                                              byte[] _payment_id)
        Finds a [`Route`] between `payer` and `payee` for a payment with the given values. Includes `PaymentHash` and `PaymentId` to be able to correlate the request with a specific payment. Note that first_hops (or a relevant inner pointer) may be NULL or all-0s to represent None
      • notify_payment_path_failed

        public void notify_payment_path_failed​(RouteHop[] path,
                                               long short_channel_id)
        Lets the router know that payment through a specific path has failed.
      • notify_payment_path_successful

        public void notify_payment_path_successful​(RouteHop[] path)
        Lets the router know that payment through a specific path was successful.
      • notify_payment_probe_successful

        public void notify_payment_probe_successful​(RouteHop[] path)
        Lets the router know that a payment probe was successful.
      • notify_payment_probe_failed

        public void notify_payment_probe_failed​(RouteHop[] path,
                                                long short_channel_id)
        Lets the router know that a payment probe failed.