X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FWatch.java;h=62f13e5e5bd8b9983f48de6c086f3bc3f1505a48;hb=1854b5cebef22ace9e9e4dd191f609818df9ce08;hp=a8bc48e83d429586b9d7b980fbe22459aad6ec8d;hpb=5fd405f7a48aaeca779c45c88ec6b3d3d3dbf0e4;p=ldk-java diff --git a/src/main/java/org/ldk/structs/Watch.java b/src/main/java/org/ldk/structs/Watch.java index a8bc48e8..62f13e5e 100644 --- a/src/main/java/org/ldk/structs/Watch.java +++ b/src/main/java/org/ldk/structs/Watch.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; /** @@ -125,6 +126,9 @@ public class Watch extends CommonBase { */ public Result_NoneChannelMonitorUpdateErrZ watch_channel(OutPoint funding_txo, ChannelMonitor monitor) { long ret = bindings.Watch_watch_channel(this.ptr, funding_txo == null ? 0 : funding_txo.ptr & ~1, monitor == null ? 0 : monitor.ptr & ~1); + Reference.reachabilityFence(this); + Reference.reachabilityFence(funding_txo); + Reference.reachabilityFence(monitor); if (ret >= 0 && ret <= 4096) { return null; } Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret); return ret_hu_conv; @@ -140,6 +144,9 @@ public class Watch extends CommonBase { */ public Result_NoneChannelMonitorUpdateErrZ update_channel(OutPoint funding_txo, ChannelMonitorUpdate update) { long ret = bindings.Watch_update_channel(this.ptr, funding_txo == null ? 0 : funding_txo.ptr & ~1, update == null ? 0 : update.ptr & ~1); + Reference.reachabilityFence(this); + Reference.reachabilityFence(funding_txo); + Reference.reachabilityFence(update); if (ret >= 0 && ret <= 4096) { return null; } Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret); return ret_hu_conv; @@ -158,6 +165,7 @@ public class Watch extends CommonBase { */ public MonitorEvent[] release_pending_monitor_events() { long[] ret = bindings.Watch_release_pending_monitor_events(this.ptr); + Reference.reachabilityFence(this); MonitorEvent[] ret_conv_14_arr = new MonitorEvent[ret.length]; for (int o = 0; o < ret.length; o++) { long ret_conv_14 = ret[o];