X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FClosingSigned.java;h=8f4823fc07579f44e9d7615ff9035557a7375c3c;hb=1854b5cebef22ace9e9e4dd191f609818df9ce08;hp=a67baf21b158a3f0e371d6a17d95a15060d97cbd;hpb=5fd405f7a48aaeca779c45c88ec6b3d3d3dbf0e4;p=ldk-java diff --git a/src/main/java/org/ldk/structs/ClosingSigned.java b/src/main/java/org/ldk/structs/ClosingSigned.java index a67baf21..8f4823fc 100644 --- a/src/main/java/org/ldk/structs/ClosingSigned.java +++ b/src/main/java/org/ldk/structs/ClosingSigned.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; @@ -24,6 +25,7 @@ public class ClosingSigned extends CommonBase { */ public byte[] get_channel_id() { byte[] ret = bindings.ClosingSigned_get_channel_id(this.ptr); + Reference.reachabilityFence(this); return ret; } @@ -32,6 +34,8 @@ public class ClosingSigned extends CommonBase { */ public void set_channel_id(byte[] val) { bindings.ClosingSigned_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32)); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); } /** @@ -39,6 +43,7 @@ public class ClosingSigned extends CommonBase { */ public long get_fee_satoshis() { long ret = bindings.ClosingSigned_get_fee_satoshis(this.ptr); + Reference.reachabilityFence(this); return ret; } @@ -47,6 +52,8 @@ public class ClosingSigned extends CommonBase { */ public void set_fee_satoshis(long val) { bindings.ClosingSigned_set_fee_satoshis(this.ptr, val); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); } /** @@ -54,6 +61,7 @@ public class ClosingSigned extends CommonBase { */ public byte[] get_signature() { byte[] ret = bindings.ClosingSigned_get_signature(this.ptr); + Reference.reachabilityFence(this); return ret; } @@ -62,6 +70,8 @@ public class ClosingSigned extends CommonBase { */ public void set_signature(byte[] val) { bindings.ClosingSigned_set_signature(this.ptr, InternalUtils.check_arr_len(val, 64)); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); } /** @@ -73,6 +83,7 @@ public class ClosingSigned extends CommonBase { @Nullable public ClosingSignedFeeRange get_fee_range() { long ret = bindings.ClosingSigned_get_fee_range(this.ptr); + Reference.reachabilityFence(this); if (ret >= 0 && ret <= 4096) { return null; } ClosingSignedFeeRange ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ClosingSignedFeeRange(null, ret); } ret_hu_conv.ptrs_to.add(this); @@ -87,6 +98,8 @@ public class ClosingSigned extends CommonBase { */ public void set_fee_range(@Nullable ClosingSignedFeeRange val) { bindings.ClosingSigned_set_fee_range(this.ptr, val == null ? 0 : val.ptr & ~1); + Reference.reachabilityFence(this); + Reference.reachabilityFence(val); } /** @@ -94,6 +107,10 @@ public class ClosingSigned extends CommonBase { */ public static ClosingSigned of(byte[] channel_id_arg, long fee_satoshis_arg, byte[] signature_arg, ClosingSignedFeeRange fee_range_arg) { long ret = bindings.ClosingSigned_new(InternalUtils.check_arr_len(channel_id_arg, 32), fee_satoshis_arg, InternalUtils.check_arr_len(signature_arg, 64), fee_range_arg == null ? 0 : fee_range_arg.ptr & ~1); + Reference.reachabilityFence(channel_id_arg); + Reference.reachabilityFence(fee_satoshis_arg); + Reference.reachabilityFence(signature_arg); + Reference.reachabilityFence(fee_range_arg); if (ret >= 0 && ret <= 4096) { return null; } ClosingSigned ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ClosingSigned(null, ret); } ret_hu_conv.ptrs_to.add(ret_hu_conv); @@ -102,6 +119,7 @@ public class ClosingSigned extends CommonBase { long clone_ptr() { long ret = bindings.ClosingSigned_clone_ptr(this.ptr); + Reference.reachabilityFence(this); return ret; } @@ -110,6 +128,7 @@ public class ClosingSigned extends CommonBase { */ public ClosingSigned clone() { long ret = bindings.ClosingSigned_clone(this.ptr); + Reference.reachabilityFence(this); if (ret >= 0 && ret <= 4096) { return null; } ClosingSigned ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ClosingSigned(null, ret); } ret_hu_conv.ptrs_to.add(this); @@ -121,6 +140,7 @@ public class ClosingSigned extends CommonBase { */ public byte[] write() { byte[] ret = bindings.ClosingSigned_write(this.ptr); + Reference.reachabilityFence(this); return ret; } @@ -129,6 +149,7 @@ public class ClosingSigned extends CommonBase { */ public static Result_ClosingSignedDecodeErrorZ read(byte[] ser) { long ret = bindings.ClosingSigned_read(ser); + Reference.reachabilityFence(ser); if (ret >= 0 && ret <= 4096) { return null; } Result_ClosingSignedDecodeErrorZ ret_hu_conv = Result_ClosingSignedDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv;