| 282 | } |
| 283 | |
| 284 | static void funding_success(struct channel *channel) |
| 285 | { |
| 286 | struct json_stream *response; |
| 287 | struct funding_channel *fc = |
| 288 | channel->peer->uncommitted_channel->fc; |
| 289 | struct command *cmd = fc->cmd; |
| 290 | |
| 291 | /* Well, those cancels now need to trigger! */ |
| 292 | for (size_t i = 0; i < tal_count(fc->cancels); i++) |
| 293 | cancel_after_fundchannel_complete_success(fc->cancels[i], |
| 294 | channel); |
| 295 | |
| 296 | response = json_stream_success(cmd); |
| 297 | json_add_string(response, "channel_id", |
| 298 | fmt_channel_id(tmpctx, |
| 299 | &channel->cid)); |
| 300 | json_add_bool(response, "commitments_secured", true); |
| 301 | was_pending(command_success(cmd, response)); |
| 302 | } |
| 303 | |
| 304 | static void funding_started_success(struct funding_channel *fc) |
| 305 | { |
no test coverage detected