| 80 | } |
| 81 | |
| 82 | struct channel *new_full_channel(const tal_t *ctx, |
| 83 | const struct channel_id *cid, |
| 84 | const struct bitcoin_outpoint *funding, |
| 85 | u32 minimum_depth, |
| 86 | const struct height_states *blockheight_states, |
| 87 | u32 lease_expiry, |
| 88 | struct amount_sat funding_sats, |
| 89 | struct amount_msat local_msat, |
| 90 | const struct fee_states *fee_states TAKES, |
| 91 | const struct channel_config *local, |
| 92 | const struct channel_config *remote, |
| 93 | const struct basepoints *local_basepoints, |
| 94 | const struct basepoints *remote_basepoints, |
| 95 | const struct pubkey *local_funding_pubkey, |
| 96 | const struct pubkey *remote_funding_pubkey, |
| 97 | const struct channel_type *type TAKES, |
| 98 | bool option_wumbo, |
| 99 | enum side opener) |
| 100 | { |
| 101 | struct channel *channel = new_initial_channel(ctx, |
| 102 | cid, |
| 103 | funding, |
| 104 | minimum_depth, |
| 105 | blockheight_states, |
| 106 | lease_expiry, |
| 107 | funding_sats, |
| 108 | local_msat, |
| 109 | fee_states, |
| 110 | local, remote, |
| 111 | local_basepoints, |
| 112 | remote_basepoints, |
| 113 | local_funding_pubkey, |
| 114 | remote_funding_pubkey, |
| 115 | type, |
| 116 | option_wumbo, |
| 117 | opener); |
| 118 | |
| 119 | if (channel) { |
| 120 | channel->htlcs = tal(channel, struct htlc_map); |
| 121 | htlc_map_init(channel->htlcs); |
| 122 | memleak_add_helper(channel->htlcs, memleak_help_htlcmap); |
| 123 | tal_add_destructor(channel->htlcs, htlc_map_clear); |
| 124 | } |
| 125 | return channel; |
| 126 | } |
| 127 | |
| 128 | static void htlc_arr_append(const struct htlc ***arr, const struct htlc *htlc) |
| 129 | { |