[C#] Update auto-generated C# bindings
[ldk-java] / c_sharp / src / org / ldk / structs / ChannelInfo.cs
index fc0554c270e259ae8b5120e4d35ee6471fa5d2c2..8a0d79a69d3aebca5724e47c0421f3b4e86ce45f 100644 (file)
@@ -153,6 +153,7 @@ public class ChannelInfo : CommonBase {
                bindings.ChannelInfo_set_capacity_sats(this.ptr, val.ptr);
                GC.KeepAlive(this);
                GC.KeepAlive(val);
+               if (this != null) { this.ptrs_to.AddLast(val); };
        }
 
        /**
@@ -241,16 +242,18 @@ public class ChannelInfo : CommonBase {
         * Serialize the ChannelInfo object into a byte array which can be read by ChannelInfo_read
         */
        public byte[] write() {
-               byte[] ret = bindings.ChannelInfo_write(this.ptr);
+               long ret = bindings.ChannelInfo_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 ChannelInfo from a byte array, created by ChannelInfo_write
         */
        public static Result_ChannelInfoDecodeErrorZ read(byte[] ser) {
-               long ret = bindings.ChannelInfo_read(ser);
+               long ret = bindings.ChannelInfo_read(InternalUtils.encodeUint8Array(ser));
                GC.KeepAlive(ser);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ChannelInfoDecodeErrorZ ret_hu_conv = Result_ChannelInfoDecodeErrorZ.constr_from_ptr(ret);