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.
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
sourceimpl Clone for HTLCDestination
impl Clone for HTLCDestination
sourcefn clone(&self) -> HTLCDestination
fn clone(&self) -> HTLCDestination
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for HTLCDestination
impl Debug for HTLCDestination
sourceimpl MaybeReadable for HTLCDestination
impl MaybeReadable for HTLCDestination
sourceimpl PartialEq<HTLCDestination> for HTLCDestination
impl PartialEq<HTLCDestination> for HTLCDestination
sourcefn eq(&self, other: &HTLCDestination) -> bool
fn eq(&self, other: &HTLCDestination) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &HTLCDestination) -> bool
fn ne(&self, other: &HTLCDestination) -> bool
This method tests for !=
.
sourceimpl Writeable for HTLCDestination
impl Writeable for HTLCDestination
sourcefn write<W: Writer>(&self, writer: &mut W) -> Result<(), Error>
fn write<W: Writer>(&self, writer: &mut W) -> Result<(), Error>
Writes self out to the given Writer
sourcefn encode(&self) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn encode(&self) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Writes self out to a Vec
sourcefn serialized_length(&self) -> usize
fn serialized_length(&self) -> usize
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
impl StructuralPartialEq for HTLCDestination
Auto Trait Implementations
impl RefUnwindSafe for HTLCDestination
impl Send for HTLCDestination
impl Sync for HTLCDestination
impl Unpin for HTLCDestination
impl UnwindSafe for HTLCDestination
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more