namespace org { namespace ldk { namespace structs {
/**
- * Options for how to set the max dust HTLC exposure allowed on a channel. See
+ * Options for how to set the max dust exposure allowed on a channel. See
* [`ChannelConfig::max_dust_htlc_exposure`] for details.
*/
public class MaxDustHTLCExposure : CommonBase {
* This ignores pointers and is_owned flags and looks at the values in fields.
*/
public bool eq(org.ldk.structs.MaxDustHTLCExposure b) {
- bool ret = bindings.MaxDustHTLCExposure_eq(this.ptr, b == null ? 0 : b.ptr);
+ bool ret = bindings.MaxDustHTLCExposure_eq(this.ptr, b.ptr);
GC.KeepAlive(this);
GC.KeepAlive(b);
return ret;
* 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);