* 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.
*
* 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.
*
*/
@SuppressWarnings("unchecked") // We correctly assign various generic arrays
public class NetworkUpdate extends CommonBase {
*/
@SuppressWarnings("unchecked") // We correctly assign various generic arrays
public class NetworkUpdate extends CommonBase {
if (raw_val.getClass() == bindings.LDKNetworkUpdate.ChannelUpdateMessage.class) {
return new ChannelUpdateMessage(ptr, (bindings.LDKNetworkUpdate.ChannelUpdateMessage)raw_val);
}
if (raw_val.getClass() == bindings.LDKNetworkUpdate.ChannelUpdateMessage.class) {
return new ChannelUpdateMessage(ptr, (bindings.LDKNetworkUpdate.ChannelUpdateMessage)raw_val);
}
- if (raw_val.getClass() == bindings.LDKNetworkUpdate.ChannelClosed.class) {
- return new ChannelClosed(ptr, (bindings.LDKNetworkUpdate.ChannelClosed)raw_val);
+ if (raw_val.getClass() == bindings.LDKNetworkUpdate.ChannelFailure.class) {
+ return new ChannelFailure(ptr, (bindings.LDKNetworkUpdate.ChannelFailure)raw_val);
}
if (raw_val.getClass() == bindings.LDKNetworkUpdate.NodeFailure.class) {
return new NodeFailure(ptr, (bindings.LDKNetworkUpdate.NodeFailure)raw_val);
}
if (raw_val.getClass() == bindings.LDKNetworkUpdate.NodeFailure.class) {
return new NodeFailure(ptr, (bindings.LDKNetworkUpdate.NodeFailure)raw_val);
- ChannelUpdate msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new ChannelUpdate(null, msg); }
- msg_hu_conv.ptrs_to.add(this);
+ org.ldk.structs.ChannelUpdate msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.ChannelUpdate(null, msg); }
+ if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.add(this); };
- * An error indicating only that a channel has been closed, which should be applied via
- * [`NetworkGraph::close_channel_from_update`].
+ * An error indicating that a channel failed to route a payment, which should be applied via
+ * [`NetworkGraph::channel_failed`].
- * An error indicating only that a node has failed, which should be applied via
- * [`NetworkGraph::fail_node`].
+ * An error indicating that a node failed to route a payment, which should be applied via
+ * [`NetworkGraph::node_failed`].
Reference.reachabilityFence(this);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.NetworkUpdate ret_hu_conv = org.ldk.structs.NetworkUpdate.constr_from_ptr(ret);
Reference.reachabilityFence(this);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.NetworkUpdate ret_hu_conv = org.ldk.structs.NetworkUpdate.constr_from_ptr(ret);
* Utility method to constructs a new ChannelUpdateMessage-variant NetworkUpdate
*/
public static NetworkUpdate channel_update_message(ChannelUpdate msg) {
* Utility method to constructs a new ChannelUpdateMessage-variant NetworkUpdate
*/
public static NetworkUpdate channel_update_message(ChannelUpdate msg) {
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.NetworkUpdate ret_hu_conv = org.ldk.structs.NetworkUpdate.constr_from_ptr(ret);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.NetworkUpdate ret_hu_conv = org.ldk.structs.NetworkUpdate.constr_from_ptr(ret);
- public static NetworkUpdate channel_closed(long short_channel_id, boolean is_permanent) {
- long ret = bindings.NetworkUpdate_channel_closed(short_channel_id, is_permanent);
+ public static NetworkUpdate channel_failure(long short_channel_id, boolean is_permanent) {
+ long ret = bindings.NetworkUpdate_channel_failure(short_channel_id, is_permanent);
Reference.reachabilityFence(short_channel_id);
Reference.reachabilityFence(is_permanent);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.NetworkUpdate ret_hu_conv = org.ldk.structs.NetworkUpdate.constr_from_ptr(ret);
Reference.reachabilityFence(short_channel_id);
Reference.reachabilityFence(is_permanent);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.NetworkUpdate ret_hu_conv = org.ldk.structs.NetworkUpdate.constr_from_ptr(ret);
Reference.reachabilityFence(is_permanent);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.NetworkUpdate ret_hu_conv = org.ldk.structs.NetworkUpdate.constr_from_ptr(ret);
Reference.reachabilityFence(is_permanent);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.NetworkUpdate ret_hu_conv = org.ldk.structs.NetworkUpdate.constr_from_ptr(ret);