X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FUnsignedChannelUpdate.java;h=5779143763efe6802073b833e2843bcec4f7fdf5;hb=f3e670e9341decac613d33fc52febf19cea32f20;hp=263dd91404addfc460822b48b9c29b5b450b1844;hpb=32692e00046b7ec16b6a2e20bd54800b2b48d4c0;p=ldk-java diff --git a/src/main/java/org/ldk/structs/UnsignedChannelUpdate.java b/src/main/java/org/ldk/structs/UnsignedChannelUpdate.java index 263dd914..57791437 100644 --- a/src/main/java/org/ldk/structs/UnsignedChannelUpdate.java +++ b/src/main/java/org/ldk/structs/UnsignedChannelUpdate.java @@ -31,7 +31,7 @@ public class UnsignedChannelUpdate extends CommonBase { * The genesis hash of the blockchain where the channel is to be opened */ public void set_chain_hash(byte[] val) { - bindings.UnsignedChannelUpdate_set_chain_hash(this.ptr, val); + bindings.UnsignedChannelUpdate_set_chain_hash(this.ptr, InternalUtils.check_arr_len(val, 32)); } /** @@ -153,13 +153,18 @@ public class UnsignedChannelUpdate extends CommonBase { bindings.UnsignedChannelUpdate_set_fee_proportional_millionths(this.ptr, val); } + long clone_ptr() { + long ret = bindings.UnsignedChannelUpdate_clone_ptr(this.ptr); + return ret; + } + /** * Creates a copy of the UnsignedChannelUpdate */ public UnsignedChannelUpdate clone() { long ret = bindings.UnsignedChannelUpdate_clone(this.ptr); - if (ret >= 0 && ret < 1024) { return null; } - UnsignedChannelUpdate ret_hu_conv = new UnsignedChannelUpdate(null, ret); + if (ret >= 0 && ret <= 4096) { return null; } + UnsignedChannelUpdate ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new UnsignedChannelUpdate(null, ret); } ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; } @@ -177,7 +182,7 @@ public class UnsignedChannelUpdate extends CommonBase { */ public static Result_UnsignedChannelUpdateDecodeErrorZ read(byte[] ser) { long ret = bindings.UnsignedChannelUpdate_read(ser); - if (ret >= 0 && ret < 1024) { return null; } + if (ret >= 0 && ret <= 4096) { return null; } Result_UnsignedChannelUpdateDecodeErrorZ ret_hu_conv = Result_UnsignedChannelUpdateDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; }