Update auto-generated bindings to 0.0.103
[ldk-java] / src / main / java / org / ldk / structs / DirectionalChannelInfo.java
index d67d896483170abc6c6c0fc8b54e128c1b3761e1..d90c4fc50b7ebf7c80ed4b5b7ace1681dc856f34 100644 (file)
@@ -87,7 +87,7 @@ public class DirectionalChannelInfo extends CommonBase {
         */
        public Option_u64Z get_htlc_maximum_msat() {
                long ret = bindings.DirectionalChannelInfo_get_htlc_maximum_msat(this.ptr);
-               if (ret < 1024) { return null; }
+               if (ret >= 0 && ret <= 4096) { return null; }
                Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
@@ -105,8 +105,8 @@ public class DirectionalChannelInfo extends CommonBase {
         */
        public RoutingFees get_fees() {
                long ret = bindings.DirectionalChannelInfo_get_fees(this.ptr);
-               if (ret < 1024) { return null; }
-               RoutingFees ret_hu_conv = new RoutingFees(null, ret);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               RoutingFees ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new RoutingFees(null, ret); }
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
@@ -116,7 +116,6 @@ public class DirectionalChannelInfo extends CommonBase {
         */
        public void set_fees(RoutingFees val) {
                bindings.DirectionalChannelInfo_set_fees(this.ptr, val == null ? 0 : val.ptr & ~1);
-               this.ptrs_to.add(val);
        }
 
        /**
@@ -130,8 +129,8 @@ public class DirectionalChannelInfo extends CommonBase {
        @Nullable
        public ChannelUpdate get_last_update_message() {
                long ret = bindings.DirectionalChannelInfo_get_last_update_message(this.ptr);
-               if (ret < 1024) { return null; }
-               ChannelUpdate ret_hu_conv = new ChannelUpdate(null, ret);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               ChannelUpdate ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ChannelUpdate(null, ret); }
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
@@ -146,7 +145,6 @@ public class DirectionalChannelInfo extends CommonBase {
         */
        public void set_last_update_message(@Nullable ChannelUpdate val) {
                bindings.DirectionalChannelInfo_set_last_update_message(this.ptr, val == null ? 0 : val.ptr & ~1);
-               this.ptrs_to.add(val);
        }
 
        /**
@@ -154,11 +152,9 @@ public class DirectionalChannelInfo extends CommonBase {
         */
        public static DirectionalChannelInfo of(int last_update_arg, boolean enabled_arg, short cltv_expiry_delta_arg, long htlc_minimum_msat_arg, Option_u64Z htlc_maximum_msat_arg, RoutingFees fees_arg, ChannelUpdate last_update_message_arg) {
                long ret = bindings.DirectionalChannelInfo_new(last_update_arg, enabled_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg.ptr, fees_arg == null ? 0 : fees_arg.ptr & ~1, last_update_message_arg == null ? 0 : last_update_message_arg.ptr & ~1);
-               if (ret < 1024) { return null; }
-               DirectionalChannelInfo ret_hu_conv = new DirectionalChannelInfo(null, ret);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               DirectionalChannelInfo ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new DirectionalChannelInfo(null, ret); }
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
-               ret_hu_conv.ptrs_to.add(fees_arg);
-               ret_hu_conv.ptrs_to.add(last_update_message_arg);
                return ret_hu_conv;
        }
 
@@ -167,8 +163,8 @@ public class DirectionalChannelInfo extends CommonBase {
         */
        public DirectionalChannelInfo clone() {
                long ret = bindings.DirectionalChannelInfo_clone(this.ptr);
-               if (ret < 1024) { return null; }
-               DirectionalChannelInfo ret_hu_conv = new DirectionalChannelInfo(null, ret);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               DirectionalChannelInfo ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new DirectionalChannelInfo(null, ret); }
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
@@ -186,7 +182,7 @@ public class DirectionalChannelInfo extends CommonBase {
         */
        public static Result_DirectionalChannelInfoDecodeErrorZ read(byte[] ser) {
                long ret = bindings.DirectionalChannelInfo_read(ser);
-               if (ret < 1024) { return null; }
+               if (ret >= 0 && ret <= 4096) { return null; }
                Result_DirectionalChannelInfoDecodeErrorZ ret_hu_conv = Result_DirectionalChannelInfoDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }