[Java] Update auto-generated Java structs
[ldk-java] / src / main / java / org / ldk / structs / WatchedOutput.java
index 2f79d23a42df5918c129f0f14fdf6181590a2c8f..f94a9b071e98f3c7dbd395f842d7a6691d7b794f 100644 (file)
@@ -60,8 +60,8 @@ public class WatchedOutput extends CommonBase {
                long ret = bindings.WatchedOutput_get_outpoint(this.ptr);
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
-               OutPoint ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new OutPoint(null, ret); }
-               ret_hu_conv.ptrs_to.add(this);
+               org.ldk.structs.OutPoint ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OutPoint(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }
 
@@ -69,9 +69,10 @@ public class WatchedOutput extends CommonBase {
         * Outpoint identifying the transaction output.
         */
        public void set_outpoint(OutPoint val) {
-               bindings.WatchedOutput_set_outpoint(this.ptr, val == null ? 0 : val.ptr & ~1);
+               bindings.WatchedOutput_set_outpoint(this.ptr, val == null ? 0 : val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
@@ -96,13 +97,14 @@ public class WatchedOutput extends CommonBase {
         * Constructs a new WatchedOutput given each field
         */
        public static WatchedOutput of(byte[] block_hash_arg, OutPoint outpoint_arg, byte[] script_pubkey_arg) {
-               long ret = bindings.WatchedOutput_new(InternalUtils.check_arr_len(block_hash_arg, 32), outpoint_arg == null ? 0 : outpoint_arg.ptr & ~1, script_pubkey_arg);
+               long ret = bindings.WatchedOutput_new(InternalUtils.check_arr_len(block_hash_arg, 32), outpoint_arg == null ? 0 : outpoint_arg.ptr, script_pubkey_arg);
                Reference.reachabilityFence(block_hash_arg);
                Reference.reachabilityFence(outpoint_arg);
                Reference.reachabilityFence(script_pubkey_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
-               WatchedOutput ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new WatchedOutput(null, ret); }
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               org.ldk.structs.WatchedOutput ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.WatchedOutput(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(outpoint_arg); };
                return ret_hu_conv;
        }
 
@@ -119,8 +121,8 @@ public class WatchedOutput extends CommonBase {
                long ret = bindings.WatchedOutput_clone(this.ptr);
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
-               WatchedOutput ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new WatchedOutput(null, ret); }
-               ret_hu_conv.ptrs_to.add(this);
+               org.ldk.structs.WatchedOutput ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.WatchedOutput(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }