X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=c_sharp%2Fsrc%2Forg%2Fldk%2Fstructs%2FChannelMonitorUpdate.cs;h=cc3bd5d1abe9b1e076343b7474a51100d90b31b6;hb=8de7213fbf663ff60322896282dad51e8ab2f001;hp=20b4eb3750bc327932c9d264b61879eddd2d211b;hpb=afc50e5d491a11364849383b75a8f939df703bac;p=ldk-java diff --git a/c_sharp/src/org/ldk/structs/ChannelMonitorUpdate.cs b/c_sharp/src/org/ldk/structs/ChannelMonitorUpdate.cs index 20b4eb37..cc3bd5d1 100644 --- a/c_sharp/src/org/ldk/structs/ChannelMonitorUpdate.cs +++ b/c_sharp/src/org/ldk/structs/ChannelMonitorUpdate.cs @@ -106,16 +106,18 @@ public class ChannelMonitorUpdate : CommonBase { * Serialize the ChannelMonitorUpdate object into a byte array which can be read by ChannelMonitorUpdate_read */ public byte[] write() { - byte[] ret = bindings.ChannelMonitorUpdate_write(this.ptr); + long ret = bindings.ChannelMonitorUpdate_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 ChannelMonitorUpdate from a byte array, created by ChannelMonitorUpdate_write */ public static Result_ChannelMonitorUpdateDecodeErrorZ read(byte[] ser) { - long ret = bindings.ChannelMonitorUpdate_read(ser); + long ret = bindings.ChannelMonitorUpdate_read(InternalUtils.encodeUint8Array(ser)); GC.KeepAlive(ser); if (ret >= 0 && ret <= 4096) { return null; } Result_ChannelMonitorUpdateDecodeErrorZ ret_hu_conv = Result_ChannelMonitorUpdateDecodeErrorZ.constr_from_ptr(ret);