X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FChannelConfig.java;h=869ca5729206060e56fd713f8e8c066375d9492e;hb=fed2245c60159f6c074c9ed5c0f3ce273ad9841b;hp=ed37eb1d7e0d0e7b97000d4ad96cb0f57d5725cf;hpb=aa0e2aade37133339f4113a0cd7465b111f0a0d0;p=ldk-java diff --git a/src/main/java/org/ldk/structs/ChannelConfig.java b/src/main/java/org/ldk/structs/ChannelConfig.java index ed37eb1d..869ca572 100644 --- a/src/main/java/org/ldk/structs/ChannelConfig.java +++ b/src/main/java/org/ldk/structs/ChannelConfig.java @@ -14,10 +14,10 @@ public class ChannelConfig extends CommonBase { if (ptr != 0) { bindings.ChannelConfig_free(ptr); } } - public static ChannelConfig constructor_clone(ChannelConfig orig) { - long ret = bindings.ChannelConfig_clone(orig == null ? 0 : orig.ptr & ~1); + public ChannelConfig clone() { + long ret = bindings.ChannelConfig_clone(this.ptr); ChannelConfig ret_hu_conv = new ChannelConfig(null, ret); - ret_hu_conv.ptrs_to.add(orig); + ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; } @@ -51,24 +51,26 @@ public class ChannelConfig extends CommonBase { public static ChannelConfig constructor_new(int fee_proportional_millionths_arg, boolean announced_channel_arg, boolean commit_upfront_shutdown_pubkey_arg) { long ret = bindings.ChannelConfig_new(fee_proportional_millionths_arg, announced_channel_arg, commit_upfront_shutdown_pubkey_arg); ChannelConfig ret_hu_conv = new ChannelConfig(null, ret); + ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; } public static ChannelConfig constructor_default() { long ret = bindings.ChannelConfig_default(); ChannelConfig ret_hu_conv = new ChannelConfig(null, ret); + ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; } - public byte[] write(ChannelConfig obj) { - byte[] ret = bindings.ChannelConfig_write(obj == null ? 0 : obj.ptr & ~1); - this.ptrs_to.add(obj); + public byte[] write() { + byte[] ret = bindings.ChannelConfig_write(this.ptr); return ret; } public static ChannelConfig constructor_read(byte[] ser) { long ret = bindings.ChannelConfig_read(ser); ChannelConfig ret_hu_conv = new ChannelConfig(null, ret); + ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; }