X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FDirectedChannelTransactionParameters.java;h=21b66476e3281112a8181502d0a3076b529c03ae;hb=1854b5cebef22ace9e9e4dd191f609818df9ce08;hp=b86804ca37e2d8b4843e9b965f058e0c56211bd0;hpb=db1a11032b4164540a2d3403696be12bbca70e94;p=ldk-java diff --git a/src/main/java/org/ldk/structs/DirectedChannelTransactionParameters.java b/src/main/java/org/ldk/structs/DirectedChannelTransactionParameters.java index b86804ca..21b66476 100644 --- a/src/main/java/org/ldk/structs/DirectedChannelTransactionParameters.java +++ b/src/main/java/org/ldk/structs/DirectedChannelTransactionParameters.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; @@ -28,8 +29,9 @@ public class DirectedChannelTransactionParameters extends CommonBase { */ public ChannelPublicKeys broadcaster_pubkeys() { long ret = bindings.DirectedChannelTransactionParameters_broadcaster_pubkeys(this.ptr); - if (ret < 1024) { return null; } - ChannelPublicKeys ret_hu_conv = new ChannelPublicKeys(null, ret); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + ChannelPublicKeys ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ChannelPublicKeys(null, ret); } ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; } @@ -39,8 +41,9 @@ public class DirectedChannelTransactionParameters extends CommonBase { */ public ChannelPublicKeys countersignatory_pubkeys() { long ret = bindings.DirectedChannelTransactionParameters_countersignatory_pubkeys(this.ptr); - if (ret < 1024) { return null; } - ChannelPublicKeys ret_hu_conv = new ChannelPublicKeys(null, ret); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + ChannelPublicKeys ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ChannelPublicKeys(null, ret); } ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; } @@ -51,6 +54,7 @@ public class DirectedChannelTransactionParameters extends CommonBase { */ public short contest_delay() { short ret = bindings.DirectedChannelTransactionParameters_contest_delay(this.ptr); + Reference.reachabilityFence(this); return ret; } @@ -62,6 +66,7 @@ public class DirectedChannelTransactionParameters extends CommonBase { */ public boolean is_outbound() { boolean ret = bindings.DirectedChannelTransactionParameters_is_outbound(this.ptr); + Reference.reachabilityFence(this); return ret; } @@ -70,10 +75,20 @@ public class DirectedChannelTransactionParameters extends CommonBase { */ public OutPoint funding_outpoint() { long ret = bindings.DirectedChannelTransactionParameters_funding_outpoint(this.ptr); - if (ret < 1024) { return null; } - OutPoint ret_hu_conv = new OutPoint(null, ret); + 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); return ret_hu_conv; } + /** + * Whether to use anchors for this channel + */ + public boolean opt_anchors() { + boolean ret = bindings.DirectedChannelTransactionParameters_opt_anchors(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + }