| 198 | } |
| 199 | |
| 200 | struct chain_coin_mvt *new_coin_channel_open_proposed(const tal_t *ctx, |
| 201 | const struct channel_id *chan_id, |
| 202 | const struct bitcoin_outpoint *out, |
| 203 | const struct node_id *peer_id, |
| 204 | const struct amount_msat amount, |
| 205 | const struct amount_sat output_val, |
| 206 | bool is_opener, |
| 207 | bool is_leased) |
| 208 | { |
| 209 | struct chain_coin_mvt *mvt; |
| 210 | |
| 211 | mvt = new_chain_coin_mvt(ctx, NULL, NULL, out, NULL, 0, |
| 212 | take(new_tag_arr(NULL, CHANNEL_PROPOSED)), |
| 213 | amount, true, output_val, 0); |
| 214 | mvt->account_name = type_to_string(mvt, struct channel_id, chan_id); |
| 215 | mvt->peer_id = tal_dup(mvt, struct node_id, peer_id); |
| 216 | |
| 217 | /* If we're the opener, add to the tag list */ |
| 218 | if (is_opener) |
| 219 | tal_arr_expand(&mvt->tags, OPENER); |
| 220 | |
| 221 | if (is_leased) |
| 222 | tal_arr_expand(&mvt->tags, LEASED); |
| 223 | |
| 224 | return mvt; |
| 225 | } |
| 226 | |
| 227 | struct chain_coin_mvt *new_coin_channel_open(const tal_t *ctx, |
| 228 | const struct channel_id *chan_id, |
no test coverage detected