| 416 | } |
| 417 | |
| 418 | static 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 | |
| 440 | static void handle_error_channel(struct channel *channel, |
| 441 | const u8 *msg) |
no test coverage detected