Class Event.PaymentPathFailed

  • Enclosing class:
    Event

    public static final class Event.PaymentPathFailed
    extends Event
    Indicates an outbound HTLC we sent failed. Probably some intermediary node dropped something. You may wish to retry with a different route. Note that this does *not* indicate that all paths for an MPP payment have failed, see [`Event::PaymentFailed`] and [`all_paths_failed`]. [`all_paths_failed`]: Self::PaymentPathFailed::all_paths_failed
    • Field Detail

      • payment_id

        @Nullable
        public final byte[] payment_id
        The id returned by [`ChannelManager::send_payment`] and used with [`ChannelManager::retry_payment`] and [`ChannelManager::abandon_payment`]. [`ChannelManager::send_payment`]: crate::ln::channelmanager::ChannelManager::send_payment [`ChannelManager::retry_payment`]: crate::ln::channelmanager::ChannelManager::retry_payment [`ChannelManager::abandon_payment`]: crate::ln::channelmanager::ChannelManager::abandon_payment Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
      • payment_hash

        public final byte[] payment_hash
        The hash that was given to [`ChannelManager::send_payment`]. [`ChannelManager::send_payment`]: crate::ln::channelmanager::ChannelManager::send_payment
      • rejected_by_dest

        public final boolean rejected_by_dest
        Indicates the payment was rejected for some reason by the recipient. This implies that the payment has failed, not just the route in question. If this is not set, you may retry the payment via a different route.
      • network_update

        public final Option_NetworkUpdateZ network_update
        Any failure information conveyed via the Onion return packet by a node along the failed payment route. Should be applied to the [`NetworkGraph`] so that routing decisions can take into account the update. [`NetworkGraph`]: crate::routing::gossip::NetworkGraph
      • all_paths_failed

        public final boolean all_paths_failed
        For both single-path and multi-path payments, this is set if all paths of the payment have failed. This will be set to false if (1) this is an MPP payment and (2) other parts of the larger MPP payment were still in flight when this event was generated. Note that if you are retrying individual MPP parts, using this value to determine if a payment has fully failed is race-y. Because multiple failures can happen prior to events being processed, you may retry in response to a first failure, with a second failure (with `all_paths_failed` set) still pending. Then, when the second failure is processed you will see `all_paths_failed` set even though the retry of the first failure still has an associated in-flight HTLC. See (1) for an example of such a failure. If you wish to retry individual MPP parts and learn when a payment has failed, you must call [`ChannelManager::abandon_payment`] and wait for a [`Event::PaymentFailed`] event. (1) [`ChannelManager::abandon_payment`]: crate::ln::channelmanager::ChannelManager::abandon_payment
      • path

        public final RouteHop[] path
        The payment path that failed.
      • short_channel_id

        public final Option_u64Z short_channel_id
        The channel responsible for the failed payment path. Note that for route hints or for the first hop in a path this may be an SCID alias and may not refer to a channel in the public network graph. These aliases may also collide with channels in the public network graph. If this is `Some`, then the corresponding channel should be avoided when the payment is retried. May be `None` for older [`Event`] serializations.
      • retry

        @Nullable
        public final RouteParameters retry
        Parameters needed to compute a new [`Route`] when retrying the failed payment path. See [`find_route`] for details. [`Route`]: crate::routing::router::Route [`find_route`]: crate::routing::router::find_route Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None