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

Function forget

lightningd/channel_control.c:418–438  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

416}
417
418static void forget(struct channel *channel)
419{
420 struct command **forgets = tal_steal(tmpctx, channel->forgets);
421 channel->forgets = tal_arr(channel, struct command *, 0);
422
423 /* Forget the channel. */
424 delete_channel(channel);
425
426 for (size_t i = 0; i < tal_count(forgets); i++) {
427 assert(!forgets[i]->json_stream);
428
429 struct json_stream *response;
430 response = json_stream_success(forgets[i]);
431 json_add_string(response, "cancelled",
432 "Channel open canceled by RPC(after"
433 " fundchannel_complete)");
434 was_pending(command_success(forgets[i], response));
435 }
436
437 tal_free(forgets);
438}
439
440static void handle_error_channel(struct channel *channel,
441 const u8 *msg)

Callers 2

handle_error_channelFunction · 0.85
forget_channelFunction · 0.85

Calls 6

was_pendingFunction · 0.85
tal_freeFunction · 0.85
delete_channelFunction · 0.70
json_stream_successFunction · 0.70
command_successFunction · 0.70
json_add_stringFunction · 0.50

Tested by

no test coverage detected