| 225 | } |
| 226 | |
| 227 | struct chain_coin_mvt *new_coin_channel_open(const tal_t *ctx, |
| 228 | const struct channel_id *chan_id, |
| 229 | const struct bitcoin_outpoint *out, |
| 230 | const struct node_id *peer_id, |
| 231 | u32 blockheight, |
| 232 | const struct amount_msat amount, |
| 233 | const struct amount_sat output_val, |
| 234 | bool is_opener, |
| 235 | bool is_leased) |
| 236 | { |
| 237 | struct chain_coin_mvt *mvt; |
| 238 | |
| 239 | mvt = new_chain_coin_mvt(ctx, NULL, NULL, out, NULL, blockheight, |
| 240 | take(new_tag_arr(NULL, CHANNEL_OPEN)), amount, |
| 241 | true, output_val, 0); |
| 242 | mvt->account_name = type_to_string(mvt, struct channel_id, chan_id); |
| 243 | mvt->peer_id = tal_dup(mvt, struct node_id, peer_id); |
| 244 | |
| 245 | /* If we're the opener, add to the tag list */ |
| 246 | if (is_opener) |
| 247 | tal_arr_expand(&mvt->tags, OPENER); |
| 248 | |
| 249 | if (is_leased) |
| 250 | tal_arr_expand(&mvt->tags, LEASED); |
| 251 | |
| 252 | return mvt; |
| 253 | } |
| 254 | |
| 255 | struct chain_coin_mvt *new_onchain_htlc_deposit(const tal_t *ctx, |
| 256 | const struct bitcoin_outpoint *outpoint, |
no test coverage detected