X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=c_sharp%2Fsrc%2Forg%2Fldk%2Fstructs%2FMaxDustHTLCExposure.cs;fp=c_sharp%2Fsrc%2Forg%2Fldk%2Fstructs%2FMaxDustHTLCExposure.cs;h=3cc67b3107010e53407606be5a25aafc4032754a;hb=8de7213fbf663ff60322896282dad51e8ab2f001;hp=93491a4efc984889880356086deb2e7c1897ce5c;hpb=afc50e5d491a11364849383b75a8f939df703bac;p=ldk-java diff --git a/c_sharp/src/org/ldk/structs/MaxDustHTLCExposure.cs b/c_sharp/src/org/ldk/structs/MaxDustHTLCExposure.cs index 93491a4e..3cc67b31 100644 --- a/c_sharp/src/org/ldk/structs/MaxDustHTLCExposure.cs +++ b/c_sharp/src/org/ldk/structs/MaxDustHTLCExposure.cs @@ -100,16 +100,18 @@ public class MaxDustHTLCExposure : CommonBase { * Serialize the MaxDustHTLCExposure object into a byte array which can be read by MaxDustHTLCExposure_read */ public byte[] write() { - byte[] ret = bindings.MaxDustHTLCExposure_write(this.ptr); + long ret = bindings.MaxDustHTLCExposure_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 MaxDustHTLCExposure from a byte array, created by MaxDustHTLCExposure_write */ public static Result_MaxDustHTLCExposureDecodeErrorZ read(byte[] ser) { - long ret = bindings.MaxDustHTLCExposure_read(ser); + long ret = bindings.MaxDustHTLCExposure_read(InternalUtils.encodeUint8Array(ser)); GC.KeepAlive(ser); if (ret >= 0 && ret <= 4096) { return null; } Result_MaxDustHTLCExposureDecodeErrorZ ret_hu_conv = Result_MaxDustHTLCExposureDecodeErrorZ.constr_from_ptr(ret);