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

Function forget

lightningd/channel_control.c:1410–1430  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1408}
1409
1410static void forget(struct channel *channel)
1411{
1412 struct command **forgets = tal_steal(tmpctx, channel->forgets);
1413 channel->forgets = tal_arr(channel, struct command *, 0);
1414
1415 /* Forget the channel. */
1416 delete_channel(channel, false);
1417
1418 for (size_t i = 0; i < tal_count(forgets); i++) {
1419 assert(!forgets[i]->json_stream);
1420
1421 struct json_stream *response;
1422 response = json_stream_success(forgets[i]);
1423 json_add_string(response, "cancelled",
1424 "Channel open canceled by RPC(after"
1425 " fundchannel_complete)");
1426 was_pending(command_success(forgets[i], response));
1427 }
1428
1429 tal_free(forgets);
1430}
1431
1432static void handle_error_channel(struct channel *channel,
1433 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