import org.ldk.enums.*;
import org.ldk.util.*;
import java.util.Arrays;
+import java.lang.ref.Reference;
import javax.annotation.Nullable;
/**
*/
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;
*/
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;
*/
public MonitorEvent[] release_pending_monitor_events() {
long[] ret = bindings.Watch_release_pending_monitor_events(this.ptr);
- MonitorEvent[] ret_conv_14_arr = new MonitorEvent[ret.length];
- for (int o = 0; o < ret.length; o++) {
+ Reference.reachabilityFence(this);
+ int ret_conv_14_len = ret.length;
+ MonitorEvent[] ret_conv_14_arr = new MonitorEvent[ret_conv_14_len];
+ for (int o = 0; o < ret_conv_14_len; o++) {
long ret_conv_14 = ret[o];
MonitorEvent ret_conv_14_hu_conv = MonitorEvent.constr_from_ptr(ret_conv_14);
ret_conv_14_hu_conv.ptrs_to.add(this);