[Java] Update auto-generated bindings
[ldk-java] / src / main / java / org / ldk / structs / NetworkUpdate.java
index 8abc8b58ee59ce596220bb8abd4f1f63e059d584..0a85f072062ae04faaef81449ecbf7c6bfc0da2f 100644 (file)
@@ -4,6 +4,7 @@ import org.ldk.impl.bindings;
 import org.ldk.enums.*;
 import org.ldk.util.*;
 import java.util.Arrays;
+import java.lang.ref.Reference;
 import javax.annotation.Nullable;
 
 
@@ -43,7 +44,7 @@ public class NetworkUpdate extends CommonBase {
                /**
                 * The update to apply via [`NetworkGraph::update_channel`].
                */
-               public final ChannelUpdate msg;
+               public final org.ldk.structs.ChannelUpdate msg;
                private ChannelUpdateMessage(long ptr, bindings.LDKNetworkUpdate.ChannelUpdateMessage obj) {
                        super(null, ptr);
                        long msg = obj.msg;
@@ -94,6 +95,7 @@ public class NetworkUpdate extends CommonBase {
        }
        long clone_ptr() {
                long ret = bindings.NetworkUpdate_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
                return ret;
        }
 
@@ -102,8 +104,9 @@ public class NetworkUpdate extends CommonBase {
         */
        public NetworkUpdate clone() {
                long ret = bindings.NetworkUpdate_clone(this.ptr);
+               Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
-               NetworkUpdate ret_hu_conv = NetworkUpdate.constr_from_ptr(ret);
+               org.ldk.structs.NetworkUpdate ret_hu_conv = org.ldk.structs.NetworkUpdate.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
@@ -113,8 +116,9 @@ public class NetworkUpdate extends CommonBase {
         */
        public static NetworkUpdate channel_update_message(ChannelUpdate msg) {
                long ret = bindings.NetworkUpdate_channel_update_message(msg == null ? 0 : msg.ptr & ~1);
+               Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
-               NetworkUpdate ret_hu_conv = NetworkUpdate.constr_from_ptr(ret);
+               org.ldk.structs.NetworkUpdate ret_hu_conv = org.ldk.structs.NetworkUpdate.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                return ret_hu_conv;
        }
@@ -124,8 +128,10 @@ public class NetworkUpdate extends CommonBase {
         */
        public static NetworkUpdate channel_closed(long short_channel_id, boolean is_permanent) {
                long ret = bindings.NetworkUpdate_channel_closed(short_channel_id, is_permanent);
+               Reference.reachabilityFence(short_channel_id);
+               Reference.reachabilityFence(is_permanent);
                if (ret >= 0 && ret <= 4096) { return null; }
-               NetworkUpdate ret_hu_conv = NetworkUpdate.constr_from_ptr(ret);
+               org.ldk.structs.NetworkUpdate ret_hu_conv = org.ldk.structs.NetworkUpdate.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                return ret_hu_conv;
        }
@@ -135,8 +141,10 @@ public class NetworkUpdate extends CommonBase {
         */
        public static NetworkUpdate node_failure(byte[] node_id, boolean is_permanent) {
                long ret = bindings.NetworkUpdate_node_failure(InternalUtils.check_arr_len(node_id, 33), is_permanent);
+               Reference.reachabilityFence(node_id);
+               Reference.reachabilityFence(is_permanent);
                if (ret >= 0 && ret <= 4096) { return null; }
-               NetworkUpdate ret_hu_conv = NetworkUpdate.constr_from_ptr(ret);
+               org.ldk.structs.NetworkUpdate ret_hu_conv = org.ldk.structs.NetworkUpdate.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                return ret_hu_conv;
        }
@@ -146,6 +154,7 @@ public class NetworkUpdate extends CommonBase {
         */
        public byte[] write() {
                byte[] ret = bindings.NetworkUpdate_write(this.ptr);
+               Reference.reachabilityFence(this);
                return ret;
        }