MCPcopy Create free account
hub / github.com/ElementsProject/lightning / new_coin_channel_open_proposed

Function new_coin_channel_open_proposed

common/coin_mvt.c:200–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198}
199
200struct 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
227struct chain_coin_mvt *new_coin_channel_open(const tal_t *ctx,
228 const struct channel_id *chan_id,

Callers 1

channel_record_openFunction · 0.85

Calls 3

new_chain_coin_mvtFunction · 0.85
new_tag_arrFunction · 0.70
type_to_stringClass · 0.70

Tested by

no test coverage detected