| 1408 | } |
| 1409 | |
| 1410 | static 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 | |
| 1432 | static void handle_error_channel(struct channel *channel, |
| 1433 | const u8 *msg) |
no test coverage detected