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

Function new_coin_channel_close

common/coin_mvt.c:382–409  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

380}
381
382struct chain_coin_mvt *new_coin_channel_close(const tal_t *ctx,
383 const struct channel *channel,
384 const char *alt_account,
385 const struct bitcoin_txid *txid,
386 const struct bitcoin_outpoint *out,
387 u32 blockheight,
388 const struct amount_msat amount,
389 const struct amount_sat output_val,
390 u32 output_count,
391 bool is_splice)
392{
393 struct chain_coin_mvt *mvt;
394 struct mvt_tags tags;
395
396 if (is_splice)
397 tags = mk_mvt_tags(MVT_CHANNEL_CLOSE, MVT_SPLICE);
398 else
399 tags = mk_mvt_tags(MVT_CHANNEL_CLOSE);
400
401 mvt = new_chain_coin_mvt(ctx, channel, alt_account,
402 coinmvt_current_time(), txid,
403 out, NULL, blockheight,
404 tags,
405 COIN_DEBIT, amount,
406 output_val,
407 output_count);
408 return mvt;
409}
410
411struct chain_coin_mvt *new_coin_channel_open_proposed(const tal_t *ctx,
412 const struct channel *channel,

Callers 2

mainFunction · 0.50
channel_record_spliceFunction · 0.50

Calls 2

new_chain_coin_mvtFunction · 0.85
coinmvt_current_timeFunction · 0.85

Tested by 1

mainFunction · 0.40