- public static NetworkUpdate channel_closed(long short_channel_id, boolean is_permanent) {
- long ret = bindings.NetworkUpdate_channel_closed(short_channel_id, is_permanent);
- if (ret < 1024) { return null; }
- NetworkUpdate ret_hu_conv = NetworkUpdate.constr_from_ptr(ret);
- ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ 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);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };