X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FChannelHandshakeConfig.java;h=f89b9a05654d7bbb1213e2e295a0c245e2d1cc1d;hb=65a17b9ef4884736783566e30e075ca59b472cc7;hp=414c760689508b073b9f82eba123efede7d95818;hpb=b6cc0960eaee5a5bbc7fde79a56152d6dcd649d8;p=ldk-java diff --git a/src/main/java/org/ldk/structs/ChannelHandshakeConfig.java b/src/main/java/org/ldk/structs/ChannelHandshakeConfig.java index 414c7606..f89b9a05 100644 --- a/src/main/java/org/ldk/structs/ChannelHandshakeConfig.java +++ b/src/main/java/org/ldk/structs/ChannelHandshakeConfig.java @@ -118,6 +118,7 @@ public class ChannelHandshakeConfig extends CommonBase { */ public static ChannelHandshakeConfig of(int minimum_depth_arg, short our_to_self_delay_arg, long our_htlc_minimum_msat_arg) { long ret = bindings.ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg); + if (ret < 1024) { return null; } ChannelHandshakeConfig ret_hu_conv = new ChannelHandshakeConfig(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -128,6 +129,7 @@ public class ChannelHandshakeConfig extends CommonBase { */ public ChannelHandshakeConfig clone() { long ret = bindings.ChannelHandshakeConfig_clone(this.ptr); + if (ret < 1024) { return null; } ChannelHandshakeConfig ret_hu_conv = new ChannelHandshakeConfig(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -138,6 +140,7 @@ public class ChannelHandshakeConfig extends CommonBase { */ public static ChannelHandshakeConfig with_default() { long ret = bindings.ChannelHandshakeConfig_default(); + if (ret < 1024) { return null; } ChannelHandshakeConfig ret_hu_conv = new ChannelHandshakeConfig(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv;