Package org.ldk.structs
Class HTLCDestination
- java.lang.Object
-
- org.ldk.structs.HTLCDestination
-
- Direct Known Subclasses:
HTLCDestination.FailedPayment
,HTLCDestination.InvalidForward
,HTLCDestination.NextHopChannel
,HTLCDestination.UnknownNextHop
public class HTLCDestination extends Object
Intended destination of a failed HTLC as indicated in [`Event::HTLCHandlingFailed`].
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HTLCDestination.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.static class
HTLCDestination.InvalidForward
We couldn't forward to the outgoing scid.static class
HTLCDestination.NextHopChannel
We tried forwarding to a channel but failed to do so.static class
HTLCDestination.UnknownNextHop
Scenario where we are unsure of the next node to forward the HTLC to.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description HTLCDestination
clone()
Creates a copy of the HTLCDestinationboolean
eq(HTLCDestination b)
Checks if two HTLCDestinations contain equal inner contents.boolean
equals(Object o)
static HTLCDestination
failed_payment(byte[] payment_hash)
Utility method to constructs a new FailedPayment-variant HTLCDestinationprotected void
finalize()
static HTLCDestination
invalid_forward(long requested_forward_scid)
Utility method to constructs a new InvalidForward-variant HTLCDestinationstatic HTLCDestination
next_hop_channel(byte[] node_id, byte[] channel_id)
Utility method to constructs a new NextHopChannel-variant HTLCDestinationstatic HTLCDestination
unknown_next_hop(long requested_forward_scid)
Utility method to constructs a new UnknownNextHop-variant HTLCDestinationbyte[]
write()
Serialize the HTLCDestination object into a byte array which can be read by HTLCDestination_read
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
clone
public HTLCDestination clone()
Creates a copy of the HTLCDestination
-
next_hop_channel
public static HTLCDestination next_hop_channel(byte[] node_id, byte[] channel_id)
Utility method to constructs a new NextHopChannel-variant HTLCDestination
-
unknown_next_hop
public static HTLCDestination unknown_next_hop(long requested_forward_scid)
Utility method to constructs a new UnknownNextHop-variant HTLCDestination
-
invalid_forward
public static HTLCDestination invalid_forward(long requested_forward_scid)
Utility method to constructs a new InvalidForward-variant HTLCDestination
-
failed_payment
public static HTLCDestination failed_payment(byte[] payment_hash)
Utility method to constructs a new FailedPayment-variant HTLCDestination
-
eq
public boolean eq(HTLCDestination b)
Checks if two HTLCDestinations contain equal inner contents. This ignores pointers and is_owned flags and looks at the values in fields.
-
write
public byte[] write()
Serialize the HTLCDestination object into a byte array which can be read by HTLCDestination_read
-
-