| 3439 | } |
| 3440 | |
| 3441 | static u8 *handle_funding_depth(struct state *state, u8 *msg) |
| 3442 | { |
| 3443 | u32 depth; |
| 3444 | |
| 3445 | if (!fromwire_dualopend_depth_reached(msg, &depth)) |
| 3446 | master_badmsg(WIRE_DUALOPEND_DEPTH_REACHED, msg); |
| 3447 | |
| 3448 | /* Too late, shutting down already */ |
| 3449 | if (state->shutdown_sent[LOCAL]) |
| 3450 | return NULL; |
| 3451 | |
| 3452 | /* We check this before we arrive here, but for sanity */ |
| 3453 | assert(state->minimum_depth <= depth); |
| 3454 | |
| 3455 | /* Tell gossipd the new channel exists before we tell peer. */ |
| 3456 | tell_gossipd_new_channel(state); |
| 3457 | |
| 3458 | send_channel_ready(state); |
| 3459 | if (state->channel_ready[REMOTE]) |
| 3460 | return towire_dualopend_channel_locked(state); |
| 3461 | |
| 3462 | return NULL; |
| 3463 | } |
| 3464 | |
| 3465 | /* BOLT #2: |
| 3466 | * |
no test coverage detected