X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FAcceptChannel.java;h=2771149f08f5f06c7a514d608f773ef5fbc28471;hb=9e8763c71cd61d55be7c869d973524f75209a3f3;hp=f0f0a39afc54193b24a5ba654e9d89b63e4a340a;hpb=aa0e2aade37133339f4113a0cd7465b111f0a0d0;p=ldk-java diff --git a/src/main/java/org/ldk/structs/AcceptChannel.java b/src/main/java/org/ldk/structs/AcceptChannel.java index f0f0a39a..2771149f 100644 --- a/src/main/java/org/ldk/structs/AcceptChannel.java +++ b/src/main/java/org/ldk/structs/AcceptChannel.java @@ -14,13 +14,6 @@ public class AcceptChannel extends CommonBase { if (ptr != 0) { bindings.AcceptChannel_free(ptr); } } - public static AcceptChannel constructor_clone(AcceptChannel orig) { - long ret = bindings.AcceptChannel_clone(orig == null ? 0 : orig.ptr & ~1); - AcceptChannel ret_hu_conv = new AcceptChannel(null, ret); - ret_hu_conv.ptrs_to.add(orig); - return ret_hu_conv; - } - public byte[] get_temporary_channel_id() { byte[] ret = bindings.AcceptChannel_get_temporary_channel_id(this.ptr); return ret; @@ -147,15 +140,21 @@ public class AcceptChannel extends CommonBase { bindings.AcceptChannel_set_first_per_commitment_point(this.ptr, val); } - public byte[] write(AcceptChannel obj) { - byte[] ret = bindings.AcceptChannel_write(obj == null ? 0 : obj.ptr & ~1); - this.ptrs_to.add(obj); + public AcceptChannel clone() { + long ret = bindings.AcceptChannel_clone(this.ptr); + AcceptChannel ret_hu_conv = new AcceptChannel(null, ret); + ret_hu_conv.ptrs_to.add(this); + return ret_hu_conv; + } + + public byte[] write() { + byte[] ret = bindings.AcceptChannel_write(this.ptr); return ret; } - public static AcceptChannel constructor_read(byte[] ser) { + public static Result_AcceptChannelDecodeErrorZ constructor_read(byte[] ser) { long ret = bindings.AcceptChannel_read(ser); - AcceptChannel ret_hu_conv = new AcceptChannel(null, ret); + Result_AcceptChannelDecodeErrorZ ret_hu_conv = Result_AcceptChannelDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; }