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

Function forget

lightningd/channel_control.c:1458–1478  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1456}
1457
1458static void forget(struct channel *channel)
1459{
1460 struct command **forgets = tal_steal(tmpctx, channel->forgets);
1461 channel->forgets = tal_arr(channel, struct command *, 0);
1462
1463 /* Forget the channel. */
1464 delete_channel(channel, false);
1465
1466 for (size_t i = 0; i < tal_count(forgets); i++) {
1467 assert(!forgets[i]->json_stream);
1468
1469 struct json_stream *response;
1470 response = json_stream_success(forgets[i]);
1471 json_add_string(response, "cancelled",
1472 "Channel open canceled by RPC(after"
1473 " fundchannel_complete)");
1474 was_pending(command_success(forgets[i], response));
1475 }
1476
1477 tal_free(forgets);
1478}
1479
1480static void handle_error_channel(struct channel *channel,
1481 const u8 *msg)

Callers 2

handle_error_channelFunction · 0.85
forget_channelFunction · 0.85

Calls 6

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

Tested by

no test coverage detected