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

Function peer_closing_complete

lightningd/closing_control.c:283–308  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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