We were informed by channeld that channel is ready (reached mindepth) */
| 1234 | |
| 1235 | /* We were informed by channeld that channel is ready (reached mindepth) */ |
| 1236 | static void peer_got_channel_ready(struct channel *channel, const u8 *msg) |
| 1237 | { |
| 1238 | struct pubkey next_per_commitment_point; |
| 1239 | struct short_channel_id *alias_remote; |
| 1240 | |
| 1241 | if (!fromwire_channeld_got_channel_ready(tmpctx, |
| 1242 | msg, &next_per_commitment_point, &alias_remote)) { |
| 1243 | channel_internal_error(channel, |
| 1244 | "bad channel_got_channel_ready %s", |
| 1245 | tal_hex(channel, msg)); |
| 1246 | return; |
| 1247 | } |
| 1248 | |
| 1249 | if (!channel_on_channel_ready(channel, |
| 1250 | &next_per_commitment_point, |
| 1251 | alias_remote)) |
| 1252 | return; |
| 1253 | |
| 1254 | /* Remember that we got the lockin */ |
| 1255 | wallet_channel_save(channel->peer->ld->wallet, channel); |
| 1256 | |
| 1257 | if (channel->depth >= channel->minimum_depth) |
| 1258 | lockin_complete(channel, CHANNELD_AWAITING_LOCKIN); |
| 1259 | } |
| 1260 | |
| 1261 | static void peer_got_announcement(struct channel *channel, const u8 *msg) |
| 1262 | { |
no test coverage detected