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

Function peer_closing_complete

lightningd/closing_control.c:443–468  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

441}
442
443static void peer_closing_complete(struct channel *channel, const u8 *msg)
444{
445 if (!fromwire_closingd_complete(msg)) {
446 channel_internal_error(channel, "Bad closing_complete %s",
447 tal_hex(msg, msg));
448 return;
449 }
450
451 /* Don't report spurious failure when closingd exits. */
452 channel_set_owner(channel, NULL);
453 /* Clear any transient negotiation messages */
454 channel_set_billboard(channel, false, NULL);
455
456 /* Retransmission only, ignore closing. */
457 if (channel->state != CLOSINGD_SIGEXCHANGE)
458 return;
459
460 channel_set_state(channel,
461 CLOSINGD_SIGEXCHANGE,
462 CLOSINGD_COMPLETE,
463 REASON_UNKNOWN,
464 "Closing complete");
465
466 /* Channel gets dropped to chain cooperatively. */
467 drop_to_chain(channel->peer->ld, channel, true, NULL);
468}
469
470static void peer_closing_notify(struct channel *channel, const u8 *msg)
471{

Callers 1

closing_msgFunction · 0.85

Calls 6

tal_hexFunction · 0.85
channel_set_ownerFunction · 0.85
channel_set_billboardFunction · 0.85
channel_set_stateFunction · 0.85
drop_to_chainFunction · 0.85
channel_internal_errorFunction · 0.70

Tested by

no test coverage detected