| 1456 | } |
| 1457 | |
| 1458 | static 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 | |
| 1480 | static void handle_error_channel(struct channel *channel, |
| 1481 | const u8 *msg) |
no test coverage detected