Update auto-generated bindings
[ldk-java] / src / main / java / org / ldk / structs / UnsignedChannelAnnouncement.java
index daeed9d6db7a9a2bafdd3044d58abfb547ebdbff..d0ff748a6602f04ba5d60635ab50101543f1c46b 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,6 +24,7 @@ public class UnsignedChannelAnnouncement extends CommonBase {
         */
        public ChannelFeatures get_features() {
                long ret = bindings.UnsignedChannelAnnouncement_get_features(this.ptr);
+               if (ret < 1024) { return null; }
                ChannelFeatures 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,6 +132,7 @@ public class UnsignedChannelAnnouncement extends CommonBase {
         */
        public UnsignedChannelAnnouncement clone() {
                long ret = bindings.UnsignedChannelAnnouncement_clone(this.ptr);
+               if (ret < 1024) { return null; }
                UnsignedChannelAnnouncement ret_hu_conv = new UnsignedChannelAnnouncement(null, ret);
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
@@ -149,6 +151,7 @@ public class UnsignedChannelAnnouncement extends CommonBase {
         */
        public static Result_UnsignedChannelAnnouncementDecodeErrorZ read(byte[] ser) {
                long ret = bindings.UnsignedChannelAnnouncement_read(ser);
+               if (ret < 1024) { return null; }
                Result_UnsignedChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }