| 1787 | } |
| 1788 | |
| 1789 | static u8 **derive_htlc_scripts(const struct htlc_stub *htlcs, enum side side) |
| 1790 | { |
| 1791 | size_t i; |
| 1792 | u8 **htlc_scripts = tal_arr(htlcs, u8 *, tal_count(htlcs)); |
| 1793 | |
| 1794 | for (i = 0; i < tal_count(htlcs); i++) { |
| 1795 | if (htlcs[i].owner == side) |
| 1796 | htlc_scripts[i] = htlc_offered_wscript(htlc_scripts, |
| 1797 | &htlcs[i].ripemd, |
| 1798 | keyset, |
| 1799 | option_anchor_outputs, |
| 1800 | option_anchors_zero_fee_htlc_tx); |
| 1801 | else { |
| 1802 | /* FIXME: remove abs_locktime */ |
| 1803 | struct abs_locktime ltime; |
| 1804 | if (!blocks_to_abs_locktime(htlcs[i].cltv_expiry, |
| 1805 | <ime)) |
| 1806 | status_failed(STATUS_FAIL_INTERNAL_ERROR, |
| 1807 | "Could not convert cltv_expiry %u to locktime", |
| 1808 | htlcs[i].cltv_expiry); |
| 1809 | htlc_scripts[i] = htlc_received_wscript(htlc_scripts, |
| 1810 | &htlcs[i].ripemd, |
| 1811 | <ime, |
| 1812 | keyset, |
| 1813 | option_anchor_outputs, |
| 1814 | option_anchors_zero_fee_htlc_tx); |
| 1815 | } |
| 1816 | } |
| 1817 | return htlc_scripts; |
| 1818 | } |
| 1819 | |
| 1820 | static size_t resolve_our_htlc_ourcommit(struct tracked_output *out, |
| 1821 | const size_t *matches, |
no test coverage detected