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

Function peer_closing_complete

lightningd/closing_control.c:281–305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

279}
280
281static void peer_closing_complete(struct channel *channel, const u8 *msg)
282{
283 if (!fromwire_closingd_complete(msg)) {
284 channel_internal_error(channel, "Bad closing_complete %s",
285 tal_hex(msg, msg));
286 return;
287 }
288
289 /* Don't report spurious failure when closingd exits. */
290 channel_set_owner(channel, NULL);
291 /* Clear any transient negotiation messages */
292 channel_set_billboard(channel, false, NULL);
293
294 /* Retransmission only, ignore closing. */
295 if (channel_closed(channel))
296 return;
297
298 /* Channel gets dropped to chain cooperatively. */
299 drop_to_chain(channel->peer->ld, channel, true);
300 channel_set_state(channel,
301 CLOSINGD_SIGEXCHANGE,
302 CLOSINGD_COMPLETE,
303 REASON_UNKNOWN,
304 "Closing complete");
305}
306
307static void peer_closing_notify(struct channel *channel, const u8 *msg)
308{

Callers 1

closing_msgFunction · 0.85

Calls 7

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

Tested by

no test coverage detected