- bindings.CommitmentUpdate_set_update_fulfill_htlcs(this.ptr, Arrays.stream(val).mapToLong(arr_conv_19 -> arr_conv_19 == null ? 0 : arr_conv_19.ptr & ~1).toArray());
- /* TODO 2 UpdateFulfillHTLC */;
+ bindings.CommitmentUpdate_set_update_fulfill_htlcs(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_19 -> val_conv_19 == null ? 0 : val_conv_19.ptr & ~1).toArray() : null);
+ }
+
+ /**
+ * update_fail_htlc messages which should be sent
+ */
+ public UpdateFailHTLC[] get_update_fail_htlcs() {
+ long[] ret = bindings.CommitmentUpdate_get_update_fail_htlcs(this.ptr);
+ UpdateFailHTLC[] ret_conv_16_arr = new UpdateFailHTLC[ret.length];
+ for (int q = 0; q < ret.length; q++) {
+ long ret_conv_16 = ret[q];
+ UpdateFailHTLC ret_conv_16_hu_conv = null; if (ret_conv_16 < 0 || ret_conv_16 > 4096) { ret_conv_16_hu_conv = new UpdateFailHTLC(null, ret_conv_16); }
+ ret_conv_16_hu_conv.ptrs_to.add(this);
+ ret_conv_16_arr[q] = ret_conv_16_hu_conv;
+ }
+ return ret_conv_16_arr;