X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FCommitmentSigned.java;h=b14e1ca416d28204e5dfd9ba858120bc07850ff0;hb=9e8763c71cd61d55be7c869d973524f75209a3f3;hp=ba5157674e861bf1fb7aef6a66a9f529db47b92e;hpb=a9b82019e7ffa7d32d44943133bb64e1197bd2f1;p=ldk-java diff --git a/src/main/java/org/ldk/structs/CommitmentSigned.java b/src/main/java/org/ldk/structs/CommitmentSigned.java index ba515767..b14e1ca4 100644 --- a/src/main/java/org/ldk/structs/CommitmentSigned.java +++ b/src/main/java/org/ldk/structs/CommitmentSigned.java @@ -14,12 +14,6 @@ public class CommitmentSigned extends CommonBase { if (ptr != 0) { bindings.CommitmentSigned_free(ptr); } } - public CommitmentSigned clone() { - long ret = bindings.CommitmentSigned_clone(this.ptr); - CommitmentSigned ret_hu_conv = new CommitmentSigned(null, ret); - return ret_hu_conv; - } - public byte[] get_channel_id() { byte[] ret = bindings.CommitmentSigned_get_channel_id(this.ptr); return ret; @@ -45,6 +39,14 @@ public class CommitmentSigned extends CommonBase { public static CommitmentSigned constructor_new(byte[] channel_id_arg, byte[] signature_arg, byte[][] htlc_signatures_arg) { long ret = bindings.CommitmentSigned_new(channel_id_arg, signature_arg, htlc_signatures_arg); CommitmentSigned ret_hu_conv = new CommitmentSigned(null, ret); + ret_hu_conv.ptrs_to.add(ret_hu_conv); + return ret_hu_conv; + } + + public CommitmentSigned clone() { + long ret = bindings.CommitmentSigned_clone(this.ptr); + CommitmentSigned ret_hu_conv = new CommitmentSigned(null, ret); + ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; } @@ -53,9 +55,9 @@ public class CommitmentSigned extends CommonBase { return ret; } - public static CommitmentSigned constructor_read(byte[] ser) { + public static Result_CommitmentSignedDecodeErrorZ constructor_read(byte[] ser) { long ret = bindings.CommitmentSigned_read(ser); - CommitmentSigned ret_hu_conv = new CommitmentSigned(null, ret); + Result_CommitmentSignedDecodeErrorZ ret_hu_conv = Result_CommitmentSignedDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; }