gossipd: remove connectd functionality, enable connectd.

This patch guts gossipd of all peer-related functionality, and hands
all the peer-related requests to channeld instead.

gossipd now gets the final announcable addresses in its init msg, since
it doesn't handle socket binding any more.

lightningd now actually starts connectd, and activates it.  The init
messages for both gossipd and connectd still contain redundant fields
which need cleaning up.

There are shims to handle the fact that connectd's wire messages are
still (mostly) gossipd messages.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2018-07-24 15:48:58 +09:30
parent 92d66a5451
commit 3d3d2ef9af
16 changed files with 249 additions and 1894 deletions

View File

@@ -31,7 +31,7 @@ void channel_set_owner(struct channel *channel, struct subd *owner)
if (channel->connected && !connects_to_peer(owner)) {
u8 *msg = towire_gossipctl_peer_disconnected(NULL,
&channel->peer->id);
subd_send_msg(channel->peer->ld->gossip, take(msg));
subd_send_msg(channel->peer->ld->connectd, take(msg));
channel->connected = false;
}
}