lightningd: always tell connectd the channel id.

This means lightningd needs to create the temporary one and tell it to
openingd/dualopend, rather than the other way around.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2022-03-23 06:57:30 +10:30
parent 57263a3eb2
commit 2bc58e2327
8 changed files with 24 additions and 12 deletions

View File

@@ -1374,6 +1374,7 @@ void peer_active(struct lightningd *ld, const u8 *msg, int fd)
channel = new_unsaved_channel(peer,
peer->ld->config.fee_base,
peer->ld->config.fee_per_satoshi);
channel->cid = *channel_id;
peer_start_dualopend(peer, peer_fd, channel);
} else {
peer->uncommitted_channel = new_uncommitted_channel(peer);