pub enum HTLCDestination {
    NextHopChannel {
        node_id: Option<PublicKey>,
        channel_id: [u8; 32],
    },
    UnknownNextHop {
        requested_forward_scid: u64,
    },
    FailedPayment {
        payment_hash: PaymentHash,
    },
}
Expand description

Intended destination of a failed HTLC as indicated in Event::HTLCHandlingFailed.

Variants

NextHopChannel

Fields

node_id: Option<PublicKey>

The node_id of the next node. For backwards compatibility, this field is marked as optional, versions prior to 0.0.110 may not always be able to provide counterparty node information.

channel_id: [u8; 32]

The outgoing channel_id between us and the next node.

We tried forwarding to a channel but failed to do so. An example of such an instance is when there is insufficient capacity in our outbound channel.

UnknownNextHop

Fields

requested_forward_scid: u64

Short channel id we are requesting to forward an HTLC to.

Scenario where we are unsure of the next node to forward the HTLC to.

FailedPayment

Fields

payment_hash: PaymentHash

The payment hash of the payment we attempted to process.

Failure scenario where an HTLC may have been forwarded to be intended for us, but is invalid for some reason, so we reject it.

Some of the reasons may include:

  • HTLC Timeouts
  • Expected MPP amount to claim does not equal HTLC total
  • Claimable amount does not match expected amount

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Reads a Self in from the given Read

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Writes self out to the given Writer

Writes self out to a Vec

Gets the length of this object after it has been serialized. This can be overridden to optimize cases where we prepend an object with its length. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.