mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-22 08:34:20 +01:00
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:
@@ -79,7 +79,7 @@ msgdata,connectd_peer_disconnect_done,id,node_id,
|
||||
# Master -> connectd: make peer active immediately (we want to talk)
|
||||
msgtype,connectd_peer_make_active,2004
|
||||
msgdata,connectd_peer_make_active,id,node_id,
|
||||
msgdata,connectd_peer_make_active,channel_id,?channel_id,
|
||||
msgdata,connectd_peer_make_active,channel_id,channel_id,
|
||||
|
||||
# Connectd -> master: peer said something interesting (or you said make_active)
|
||||
# Plus fd for peer daemon.
|
||||
|
||||
|
@@ -440,9 +440,9 @@ void peer_make_active(struct daemon *daemon, const u8 *msg)
|
||||
{
|
||||
struct node_id id;
|
||||
struct peer *peer;
|
||||
struct channel_id *channel_id;
|
||||
struct channel_id channel_id;
|
||||
|
||||
if (!fromwire_connectd_peer_make_active(msg, msg, &id, &channel_id))
|
||||
if (!fromwire_connectd_peer_make_active(msg, &id, &channel_id))
|
||||
master_badmsg(WIRE_CONNECTD_PEER_MAKE_ACTIVE, msg);
|
||||
|
||||
/* Races can happen: this might be gone by now. */
|
||||
@@ -458,7 +458,7 @@ void peer_make_active(struct daemon *daemon, const u8 *msg)
|
||||
if (tal_count(peer->subds) != 0)
|
||||
return;
|
||||
|
||||
if (!activate_peer(peer, NULL, channel_id))
|
||||
if (!activate_peer(peer, NULL, &channel_id))
|
||||
tal_free(peer);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user