X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=sidebyside;f=c_sharp%2Fsrc%2Forg%2Fldk%2Fstructs%2FUpdateFailHTLC.cs;h=78ff71d344ddee8b5c2ed7e5199eb191b5cd3ec9;hb=8de7213fbf663ff60322896282dad51e8ab2f001;hp=2c29d8857fbd437a324e13426d0ab046873a848c;hpb=afc50e5d491a11364849383b75a8f939df703bac;p=ldk-java diff --git a/c_sharp/src/org/ldk/structs/UpdateFailHTLC.cs b/c_sharp/src/org/ldk/structs/UpdateFailHTLC.cs index 2c29d885..78ff71d3 100644 --- a/c_sharp/src/org/ldk/structs/UpdateFailHTLC.cs +++ b/c_sharp/src/org/ldk/structs/UpdateFailHTLC.cs @@ -21,16 +21,18 @@ public class UpdateFailHTLC : CommonBase { * The channel ID */ public byte[] get_channel_id() { - byte[] ret = bindings.UpdateFailHTLC_get_channel_id(this.ptr); + long ret = bindings.UpdateFailHTLC_get_channel_id(this.ptr); GC.KeepAlive(this); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; } /** * The channel ID */ public void set_channel_id(byte[] val) { - bindings.UpdateFailHTLC_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32)); + bindings.UpdateFailHTLC_set_channel_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32))); GC.KeepAlive(this); GC.KeepAlive(val); } @@ -92,16 +94,18 @@ public class UpdateFailHTLC : CommonBase { * Serialize the UpdateFailHTLC object into a byte array which can be read by UpdateFailHTLC_read */ public byte[] write() { - byte[] ret = bindings.UpdateFailHTLC_write(this.ptr); + long ret = bindings.UpdateFailHTLC_write(this.ptr); GC.KeepAlive(this); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; } /** * Read a UpdateFailHTLC from a byte array, created by UpdateFailHTLC_write */ public static Result_UpdateFailHTLCDecodeErrorZ read(byte[] ser) { - long ret = bindings.UpdateFailHTLC_read(ser); + long ret = bindings.UpdateFailHTLC_read(InternalUtils.encodeUint8Array(ser)); GC.KeepAlive(ser); if (ret >= 0 && ret <= 4096) { return null; } Result_UpdateFailHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailHTLCDecodeErrorZ.constr_from_ptr(ret);