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