Package org.ldk.structs
Class NetworkUpdate
- java.lang.Object
-
- org.ldk.structs.NetworkUpdate
-
- Direct Known Subclasses:
NetworkUpdate.ChannelFailure,NetworkUpdate.ChannelUpdateMessage,NetworkUpdate.NodeFailure
public class NetworkUpdate extends Object
Update to the [`NetworkGraph`] based on payment failure information conveyed via the Onion return packet by a node along the route. See [BOLT #4] for details. [BOLT #4]: https://github.com/lightning/bolts/blob/master/04-onion-routing.md
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNetworkUpdate.ChannelFailureAn error indicating that a channel failed to route a payment, which should be applied via [`NetworkGraph::channel_failed`].static classNetworkUpdate.ChannelUpdateMessageAn error indicating a `channel_update` messages should be applied via [`NetworkGraph::update_channel`].static classNetworkUpdate.NodeFailureAn error indicating that a node failed to route a payment, which should be applied via [`NetworkGraph::node_failed`].
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NetworkUpdatechannel_failure(long short_channel_id, boolean is_permanent)Utility method to constructs a new ChannelFailure-variant NetworkUpdatestatic NetworkUpdatechannel_update_message(ChannelUpdate msg)Utility method to constructs a new ChannelUpdateMessage-variant NetworkUpdateNetworkUpdateclone()Creates a copy of the NetworkUpdateprotected voidfinalize()static NetworkUpdatenode_failure(byte[] node_id, boolean is_permanent)Utility method to constructs a new NodeFailure-variant NetworkUpdatebyte[]write()Serialize the NetworkUpdate object into a byte array which can be read by NetworkUpdate_read
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
clone
public NetworkUpdate clone()
Creates a copy of the NetworkUpdate
-
channel_update_message
public static NetworkUpdate channel_update_message(ChannelUpdate msg)
Utility method to constructs a new ChannelUpdateMessage-variant NetworkUpdate
-
channel_failure
public static NetworkUpdate channel_failure(long short_channel_id, boolean is_permanent)
Utility method to constructs a new ChannelFailure-variant NetworkUpdate
-
node_failure
public static NetworkUpdate node_failure(byte[] node_id, boolean is_permanent)
Utility method to constructs a new NodeFailure-variant NetworkUpdate
-
write
public byte[] write()
Serialize the NetworkUpdate object into a byte array which can be read by NetworkUpdate_read
-
-