X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FWatchedOutput.java;h=2f79d23a42df5918c129f0f14fdf6181590a2c8f;hb=1854b5cebef22ace9e9e4dd191f609818df9ce08;hp=c0e7403d42dd5ae98aa468c6bada321895826ad9;hpb=5fd405f7a48aaeca779c45c88ec6b3d3d3dbf0e4;p=ldk-java diff --git a/src/main/java/org/ldk/structs/WatchedOutput.java b/src/main/java/org/ldk/structs/WatchedOutput.java index c0e7403d..2f79d23a 100644 --- a/src/main/java/org/ldk/structs/WatchedOutput.java +++ b/src/main/java/org/ldk/structs/WatchedOutput.java @@ -4,6 +4,7 @@ import org.ldk.impl.bindings; import org.ldk.enums.*; import org.ldk.util.*; import java.util.Arrays; +import java.lang.ref.Reference; import javax.annotation.Nullable; @@ -37,6 +38,7 @@ public class WatchedOutput extends CommonBase { @Nullable public byte[] get_block_hash() { byte[] ret = bindings.WatchedOutput_get_block_hash(this.ptr); + Reference.reachabilityFence(this); return ret; } @@ -47,6 +49,8 @@ public class WatchedOutput extends CommonBase { */ public void set_block_hash(@Nullable byte[] val) { bindings.WatchedOutput_set_block_hash(this.ptr, InternalUtils.check_arr_len(val, 32)); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); } /** @@ -54,6 +58,7 @@ public class WatchedOutput extends CommonBase { */ public OutPoint get_outpoint() { 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); @@ -65,6 +70,8 @@ public class WatchedOutput extends CommonBase { */ public void set_outpoint(OutPoint val) { bindings.WatchedOutput_set_outpoint(this.ptr, val == null ? 0 : val.ptr & ~1); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); } /** @@ -72,6 +79,7 @@ public class WatchedOutput extends CommonBase { */ public byte[] get_script_pubkey() { byte[] ret = bindings.WatchedOutput_get_script_pubkey(this.ptr); + Reference.reachabilityFence(this); return ret; } @@ -80,6 +88,8 @@ public class WatchedOutput extends CommonBase { */ public void set_script_pubkey(byte[] val) { bindings.WatchedOutput_set_script_pubkey(this.ptr, val); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); } /** @@ -87,6 +97,9 @@ public class WatchedOutput extends CommonBase { */ 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); + 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); @@ -95,6 +108,7 @@ public class WatchedOutput extends CommonBase { long clone_ptr() { long ret = bindings.WatchedOutput_clone_ptr(this.ptr); + Reference.reachabilityFence(this); return ret; } @@ -103,6 +117,7 @@ public class WatchedOutput extends CommonBase { */ public WatchedOutput clone() { 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); @@ -114,7 +129,11 @@ public class WatchedOutput extends CommonBase { */ public long hash() { long ret = bindings.WatchedOutput_hash(this.ptr); + Reference.reachabilityFence(this); return ret; } + @Override public int hashCode() { + return (int)this.hash(); + } }