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

Function handle_mutual_close

onchaind/onchaind.c:1768–1787  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1766}
1767
1768static void handle_mutual_close(struct tracked_output **outs,
1769 const struct tx_parts *tx)
1770{
1771 /* In this case, we don't care about htlcs: there are none. */
1772 init_reply(tmpctx, "Tracking mutual close transaction");
1773
1774 /* Annotate the first input as close. We can currently only have a
1775 * single input for these. */
1776 onchain_annotate_txin(&tx->txid, 0, TX_CHANNEL_CLOSE);
1777
1778 /* BOLT #5:
1779 *
1780 * A closing transaction *resolves* the funding transaction output.
1781 *
1782 * In the case of a mutual close, a node need not do anything else, as it has
1783 * already agreed to the output, which is sent to its specified `scriptpubkey`
1784 */
1785 resolved_by_other(outs[0], &tx->txid, MUTUAL_CLOSE);
1786 wait_for_resolved(outs);
1787}
1788
1789static u8 **derive_htlc_scripts(const struct htlc_stub *htlcs, enum side side)
1790{

Callers 1

mainFunction · 0.85

Calls 4

init_replyFunction · 0.85
resolved_by_otherFunction · 0.85
wait_for_resolvedFunction · 0.85
onchain_annotate_txinFunction · 0.70

Tested by

no test coverage detected