[Java] Update auto-generated Java structs
[ldk-java] / src / main / java / org / ldk / structs / Filter.java
index 8d3e19fbf67290c11169962fc58a85b7cda70652..561caaed6807728e05fac983aaa44a016bf11e45 100644 (file)
@@ -71,8 +71,8 @@ public class Filter extends CommonBase {
                                Reference.reachabilityFence(arg);
                        }
                        @Override public long register_output(long output) {
-                               WatchedOutput output_hu_conv = null; if (output < 0 || output > 4096) { output_hu_conv = new WatchedOutput(null, output); }
-                               output_hu_conv.ptrs_to.add(this);
+                               org.ldk.structs.WatchedOutput output_hu_conv = null; if (output < 0 || output > 4096) { output_hu_conv = new org.ldk.structs.WatchedOutput(null, output); }
+                               if (output_hu_conv != null) { output_hu_conv.ptrs_to.add(this); };
                                Option_C2Tuple_usizeTransactionZZ ret = arg.register_output(output_hu_conv);
                                Reference.reachabilityFence(arg);
                                long result = ret == null ? 0 : ret.clone_ptr();
@@ -104,12 +104,13 @@ public class Filter extends CommonBase {
         * full block).
         */
        public Option_C2Tuple_usizeTransactionZZ register_output(WatchedOutput output) {
-               long ret = bindings.Filter_register_output(this.ptr, output == null ? 0 : output.ptr & ~1);
+               long ret = bindings.Filter_register_output(this.ptr, output == null ? 0 : output.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(output);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.Option_C2Tuple_usizeTransactionZZ ret_hu_conv = org.ldk.structs.Option_C2Tuple_usizeTransactionZZ.constr_from_ptr(ret);
-               ret_hu_conv.ptrs_to.add(this);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               if (this != null) { this.ptrs_to.add(output); };
                return ret_hu_conv;
        }