* The channel ID
*/
public void set_channel_id(byte[] val) {
- bindings.UpdateFailHTLC_set_channel_id(this.ptr, val);
+ bindings.UpdateFailHTLC_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
}
/**
bindings.UpdateFailHTLC_set_htlc_id(this.ptr, val);
}
+ long clone_ptr() {
+ long ret = bindings.UpdateFailHTLC_clone_ptr(this.ptr);
+ return ret;
+ }
+
/**
* Creates a copy of the UpdateFailHTLC
*/
public UpdateFailHTLC clone() {
long ret = bindings.UpdateFailHTLC_clone(this.ptr);
- if (ret < 1024) { return null; }
- UpdateFailHTLC ret_hu_conv = new UpdateFailHTLC(null, ret);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ UpdateFailHTLC ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new UpdateFailHTLC(null, ret); }
ret_hu_conv.ptrs_to.add(this);
return ret_hu_conv;
}
*/
public static Result_UpdateFailHTLCDecodeErrorZ read(byte[] ser) {
long ret = bindings.UpdateFailHTLC_read(ser);
- if (ret < 1024) { return null; }
+ if (ret >= 0 && ret <= 4096) { return null; }
Result_UpdateFailHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailHTLCDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}