Update auto-generated bindings to 0.0.103
[ldk-java] / src / main / java / org / ldk / structs / UnsignedChannelAnnouncement.java
index ad0780c5ba589617d17ddbbe7296cd0be22ddce7..4d0b7c75069510ea4a1d54d659720751849e65ae 100644 (file)
@@ -4,6 +4,7 @@ import org.ldk.impl.bindings;
 import org.ldk.enums.*;
 import org.ldk.util.*;
 import java.util.Arrays;
+import javax.annotation.Nullable;
 
 
 /**
@@ -23,7 +24,8 @@ public class UnsignedChannelAnnouncement extends CommonBase {
         */
        public ChannelFeatures get_features() {
                long ret = bindings.UnsignedChannelAnnouncement_get_features(this.ptr);
-               ChannelFeatures ret_hu_conv = new ChannelFeatures(null, ret);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               ChannelFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ChannelFeatures(null, ret); }
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
@@ -33,7 +35,6 @@ public class UnsignedChannelAnnouncement extends CommonBase {
         */
        public void set_features(ChannelFeatures val) {
                bindings.UnsignedChannelAnnouncement_set_features(this.ptr, val == null ? 0 : val.ptr & ~1);
-               this.ptrs_to.add(val);
        }
 
        /**
@@ -131,7 +132,8 @@ public class UnsignedChannelAnnouncement extends CommonBase {
         */
        public UnsignedChannelAnnouncement clone() {
                long ret = bindings.UnsignedChannelAnnouncement_clone(this.ptr);
-               UnsignedChannelAnnouncement ret_hu_conv = new UnsignedChannelAnnouncement(null, ret);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               UnsignedChannelAnnouncement ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new UnsignedChannelAnnouncement(null, ret); }
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
@@ -147,8 +149,9 @@ public class UnsignedChannelAnnouncement extends CommonBase {
        /**
         * Read a UnsignedChannelAnnouncement from a byte array, created by UnsignedChannelAnnouncement_write
         */
-       public static Result_UnsignedChannelAnnouncementDecodeErrorZ constructor_read(byte[] ser) {
+       public static Result_UnsignedChannelAnnouncementDecodeErrorZ read(byte[] ser) {
                long ret = bindings.UnsignedChannelAnnouncement_read(ser);
+               if (ret >= 0 && ret <= 4096) { return null; }
                Result_UnsignedChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }