pub enum HTLCDestination {
NextHopChannel {
node_id: Option<PublicKey>,
channel_id: ChannelId,
},
UnknownNextHop {
requested_forward_scid: u64,
},
InvalidForward {
requested_forward_scid: u64,
},
InvalidOnion,
FailedPayment {
payment_hash: PaymentHash,
},
}Expand description
Intended destination of a failed HTLC as indicated in Event::HTLCHandlingFailed.
Variants§
NextHopChannel
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.
Fields
UnknownNextHop
Scenario where we are unsure of the next node to forward the HTLC to.
InvalidForward
We couldn’t forward to the outgoing scid. An example would be attempting to send a duplicate intercept HTLC.
InvalidOnion
We couldn’t decode the incoming onion to obtain the forwarding details.
FailedPayment
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
- Excess HTLCs for a payment that we have already fully received, over-paying for the payment,
- The counterparty node modified the HTLC in transit,
- A probing attack where an intermediary node is trying to detect if we are the ultimate recipient for a payment.
Fields
§
payment_hash: PaymentHashThe payment hash of the payment we attempted to process.
Trait Implementations§
Source§impl Clone for HTLCDestination
impl Clone for HTLCDestination
Source§fn clone(&self) -> HTLCDestination
fn clone(&self) -> HTLCDestination
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HTLCDestination
impl Debug for HTLCDestination
Source§impl MaybeReadable for HTLCDestination
impl MaybeReadable for HTLCDestination
Source§impl PartialEq for HTLCDestination
impl PartialEq for HTLCDestination
Source§impl Writeable for HTLCDestination
impl Writeable for HTLCDestination
impl Eq for HTLCDestination
impl StructuralPartialEq for HTLCDestination
Auto Trait Implementations§
impl Freeze for HTLCDestination
impl RefUnwindSafe for HTLCDestination
impl Send for HTLCDestination
impl Sync for HTLCDestination
impl Unpin for HTLCDestination
impl UnwindSafe for HTLCDestination
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more